From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 9/24] Implement VMCLEAR Date: Thu, 05 Aug 2010 15:03:34 +0300 Message-ID: <4C5AA896.7030400@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=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm@vger.kernel.org To: "Nadav Har'El" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62665 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755878Ab0HEMDi (ORCPT ); Thu, 5 Aug 2010 08:03:38 -0400 In-Reply-To: <20100805115025.GC16722@fermat.math.technion.ac.il> Sender: kvm-owner@vger.kernel.org List-ID: On 08/05/2010 02:50 PM, 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. I think it's safe to KVM_REQ_SHUTDOWN in this case. -- error compiling committee.c: too many arguments to function