From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 9/24] Implement VMCLEAR Date: Thu, 5 Aug 2010 14:53:04 +0300 Message-ID: <20100805115304.GL10499@redhat.com> References: <1276431753-nyh@il.ibm.com> <201006131227.o5DCRAB0012968@rice.haifa.ibm.com> <20100615134753.GX21797@redhat.com> <4C17852B.5080703@redhat.com> <20100615135405.GY21797@redhat.com> <20100805115025.GC16722@fermat.math.technion.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm@vger.kernel.org To: "Nadav Har'El" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57724 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757927Ab0HELxK (ORCPT ); Thu, 5 Aug 2010 07:53:10 -0400 Content-Disposition: inline In-Reply-To: <20100805115025.GC16722@fermat.math.technion.ac.il> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Aug 05, 2010 at 02:50:25PM +0300, Nadav Har'El wrote: > On Tue, Jun 15, 2010, Gleb Natapov wrote about "Re: [PATCH 9/24] Implement VMCLEAR": > > On Tue, Jun 15, 2010 at 04:50:35PM +0300, Avi Kivity wrote: > > > On 06/15/2010 04:47 PM, Gleb Natapov wrote: > > > Architectural errors (bad alignment) should update flags. Internal > > > errors (ENOMEM, vpmtr pointing outside of RAM) should not. > > > > > vpmtr pointing outside of RAM is architectural error (or not?). SDM > > says "The operand of this instruction is always 64 bits and is always in > > memory", but may be they mean "not in register". Anyway internal errors > > should generate error exit to userspace which this patch is also > > missing. > > I'm a bit puzzled what I am supposed to do when the guest-physical > address I get as a parameter to VMCLEAR (after I read this address from guest > virtual memory) is beyond the guest's actual memory, i.e., gfn_to_page > fails on this address. Is this a normal "architectural error" and I should > VMfail(VMCLEAR with invalid physical address)? #GP? Or something else? > The SMD says > "ensure that data for VMCS referenced by the operand is in memory" > but it doesn't appear to say what to do if that is not the case. When the > address itself is faulty (e.g., more than 32 bits in 32 bit mode) the SDM > says VMfail(VMCLEAR with invalid physical address) - but it doesn't say to > do that when the physical address is "simply" beyond the amount of available > memory. > > In any case, I don't think this should be considered an internal error, or > that we have a reason to exit to user space in this case. > But you can't emulate this either, no? -- Gleb.