From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] KVM: nVMX: correctly set tr base on nested vmexit emulation Date: Sun, 4 Aug 2013 15:59:56 +0300 Message-ID: <20130804125956.GP6042@redhat.com> References: <20130804120806.GL6042@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm , "Ren, Yongjie" , Paolo Bonzini To: Arthur Chunqi Li Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41917 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751887Ab3HDNAA (ORCPT ); Sun, 4 Aug 2013 09:00:00 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Aug 04, 2013 at 08:21:00PM +0800, Arthur Chunqi Li wrote: > Yes, I have just retraced and found the bug. This is my negligence. > Reviewers could have done a better job too :) > Reviewed-by: Arthur Chunqi Li > > On Sun, Aug 4, 2013 at 8:08 PM, Gleb Natapov wrote: > > After commit 21feb4eb64e21f8dc91136b91ee886b978ce6421 tr base is zeroed > > during vmexit. Set it to L1's HOST_TR_BASE. This should fix > > https://bugzilla.kernel.org/show_bug.cgi?id=60679 > > > > Signed-off-by: Gleb Natapov > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > > index b533cf8..7d31e7b 100644 > > --- a/arch/x86/kvm/vmx.c > > +++ b/arch/x86/kvm/vmx.c > > @@ -8261,7 +8261,7 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu, > > seg.base = vmcs12->host_gs_base; > > vmx_set_segment(vcpu, &seg, VCPU_SREG_GS); > > seg = (struct kvm_segment) { > > - .base = 0, > > + .base = vmcs12->host_tr_base, > > .limit = 0x67, > > .selector = vmcs12->host_tr_selector, > > .type = 11, > > -- > > Gleb. > > > > -- > Arthur Chunqi Li > Department of Computer Science > School of EECS > Peking University > Beijing, China -- Gleb.