From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/30] nVMX: Nested VMX, v9 Date: Mon, 23 May 2011 18:23:16 +0300 Message-ID: <4DDA7BE4.3040108@redhat.com> References: <20110512163115.GA13138@fermat.math.technion.ac.il> <20110512165157.GC20193@redhat.com> <20110522193239.GA13130@fermat.math.technion.ac.il> <4DDA2E72.8070907@redhat.com> <20110523130226.GC23407@8bytes.org> <4DDA5C30.10107@redhat.com> <20110523134052.GD23407@8bytes.org> <4DDA66AF.7020505@redhat.com> <20110523141000.GA20428@fermat.math.technion.ac.il> <4DDA700B.2040400@redhat.com> <20110523144404.GA21539@fermat.math.technion.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Joerg Roedel , 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]:56037 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753821Ab1EWPXZ (ORCPT ); Mon, 23 May 2011 11:23:25 -0400 In-Reply-To: <20110523144404.GA21539@fermat.math.technion.ac.il> Sender: kvm-owner@vger.kernel.org List-ID: On 05/23/2011 05:44 PM, Nadav Har'El wrote: > On Mon, May 23, 2011, Avi Kivity wrote about "Re: [PATCH 0/30] nVMX: Nested VMX, v9": > > vmcs01 and vmcs02 will both be generated from vmcs12. > > If you don't do a clean nested exit (from L2 to L1), vmcs02 can't be generated > from vmcs12... while L2 runs, it is possible that it modifies vmcs02 (e.g., > non-trapped bits of guest_cr0), and these modifications are not copied back > to vmcs12 until the nested exit (when prepare_vmcs12() is called to perform > this task). > > If you do a nested exit (a "fake" one), vmcs12 is made up to date, and then > indeed vmcs02 can be thrown away and regenerated. You would flush this state back to the vmcs. But that just confirms Joerg's statement that a fake vmexit/vmrun is more or less equivalent. The question is whether %rip points to the VMRUN/VMLAUNCH instruction, HOST_RIP (or the next instruction for svm), or to guest code. But the actual things we need to do are all very similar subsets of a vmexit. -- error compiling committee.c: too many arguments to function