From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/30] nVMX: Nested VMX, v9 Date: Mon, 16 May 2011 12:50:18 +0300 Message-ID: <4DD0F35A.2010901@redhat.com> References: <1304842511-nyh@il.ibm.com> <4DC7CD81.2070305@redhat.com> <20110511082027.GG19019@redhat.com> <20110512154228.GA7943@fermat.math.technion.ac.il> <20110512155727.GA20193@redhat.com> <20110512163115.GA13138@fermat.math.technion.ac.il> <20110512165157.GC20193@redhat.com> <4DCC123B.3080006@redhat.com> <20110515231140.GA17294@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, abelg@il.ibm.com To: "Nadav Har'El" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57726 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753195Ab1EPJu2 (ORCPT ); Mon, 16 May 2011 05:50:28 -0400 In-Reply-To: <20110515231140.GA17294@fermat.math.technion.ac.il> Sender: kvm-owner@vger.kernel.org List-ID: On 05/16/2011 02:11 AM, Nadav Har'El wrote: > On Thu, May 12, 2011, Avi Kivity wrote about "Re: [PATCH 0/30] nVMX: Nested VMX, v9": > > Ah, yes. For live migration to work, all vmcb state must be accessible > > via vendor-independent accessors once an exit is completely handled. > > For example, GPRs are accessible via kvm_register_read(), and without > > nesting, interrupt state is stowed in the interrupt queue, but if you > > keep IDT_VECTORING_INFO live between exit and entry, you can lose it if > > you migrate at this point. > > Hi, I can quite easily save this state in a different place which is saved - > The easiest will just be to use vmcs12, which has place for exactly the fields > we want to save (and they are rewritten anyway when we exit to L1). You would still need ->valid_idt_vectoring_info to know you need special handling, no? > Avi, would you you like me use this sort of solution to avoid the extra > state? Of course, considering that anyway, live migration with nested VMX > probably still doesn't work for a dozen other reasons :( > > Or do you consider this not enough, and rather that it is necessary that > nested VMX should use exactly the same logic as nested SVM does - namely, > use tricks like SVM's "exit_required" instead of our different tricks? I think svm is rather simple here using svm_complete_interrupts() to decode exit_int_info into the arch independent structures. I don't think ->exit_required is a hack - it could probably be improved but I think it does the right thing essentially. For example svm_nmi_allowed() will return true if in guest mode and NMI interception is enabled. -- error compiling committee.c: too many arguments to function