From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Egger, Christoph" Subject: Re: [PATCH 1/2] Nested VMX: update nested paging mode on vmexit Date: Wed, 12 Feb 2014 10:22:05 +0100 Message-ID: <52FB3D3D.9070909@amazon.de> References: <1392170936-31362-1-git-send-email-yang.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1392170936-31362-1-git-send-email-yang.z.zhang@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Yang Zhang , xen-devel@lists.xen.org Cc: eddie.dong@intel.com, xiantao.zhang@intel.com, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 12.02.14 03:08, Yang Zhang wrote: > From: Yang Zhang > > Since SVM and VMX use different mechanism to emulate the virtual-vmentry > and virtual-vmexit, it's hard to update the nested paging mode correctly in > common code. So we need to update the nested paging mode in their respective > code path. > SVM already updates the nested paging mode on vmexit. This patch adds the same > logic in VMX side. > > Previous discussion is here: > http://lists.xen.org/archives/html/xen-devel/2013-12/msg01759.html > > Signed-off-by: Yang Zhang Reviewed-by: Christoph Egger > --- > xen/arch/x86/hvm/vmx/vmx.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c > index f6409d6..baf3040 100644 > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -2541,6 +2541,7 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs) > vcpu_nestedhvm(v).nv_vmswitch_in_progress = 0; > if ( nestedhvm_vcpu_in_guestmode(v) ) > { > + paging_update_nestedmode(v); > if ( nvmx_n2_vmexit_handler(regs, exit_reason) ) > goto out; > } >