* [PATCH] KVM: nVMX: correctly set tr base on nested vmexit emulation
@ 2013-08-04 12:08 Gleb Natapov
2013-08-04 12:21 ` Arthur Chunqi Li
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Gleb Natapov @ 2013-08-04 12:08 UTC (permalink / raw)
To: kvm; +Cc: Ren, Yongjie, pbonzini, yzt356
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 <gleb@redhat.com>
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.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: nVMX: correctly set tr base on nested vmexit emulation
2013-08-04 12:08 [PATCH] KVM: nVMX: correctly set tr base on nested vmexit emulation Gleb Natapov
@ 2013-08-04 12:21 ` Arthur Chunqi Li
2013-08-04 12:59 ` Gleb Natapov
2013-08-05 6:23 ` Ren, Yongjie
2013-08-07 14:07 ` Paolo Bonzini
2 siblings, 1 reply; 5+ messages in thread
From: Arthur Chunqi Li @ 2013-08-04 12:21 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm, Ren, Yongjie, Paolo Bonzini
Yes, I have just retraced and found the bug. This is my negligence.
Reviewed-by: Arthur Chunqi Li <yzt356@gmail.com>
On Sun, Aug 4, 2013 at 8:08 PM, Gleb Natapov <gleb@redhat.com> 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 <gleb@redhat.com>
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: nVMX: correctly set tr base on nested vmexit emulation
2013-08-04 12:21 ` Arthur Chunqi Li
@ 2013-08-04 12:59 ` Gleb Natapov
0 siblings, 0 replies; 5+ messages in thread
From: Gleb Natapov @ 2013-08-04 12:59 UTC (permalink / raw)
To: Arthur Chunqi Li; +Cc: kvm, Ren, Yongjie, Paolo Bonzini
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 <yzt356@gmail.com>
>
> On Sun, Aug 4, 2013 at 8:08 PM, Gleb Natapov <gleb@redhat.com> 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 <gleb@redhat.com>
> > 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] KVM: nVMX: correctly set tr base on nested vmexit emulation
2013-08-04 12:08 [PATCH] KVM: nVMX: correctly set tr base on nested vmexit emulation Gleb Natapov
2013-08-04 12:21 ` Arthur Chunqi Li
@ 2013-08-05 6:23 ` Ren, Yongjie
2013-08-07 14:07 ` Paolo Bonzini
2 siblings, 0 replies; 5+ messages in thread
From: Ren, Yongjie @ 2013-08-05 6:23 UTC (permalink / raw)
To: Gleb Natapov, kvm@vger.kernel.org; +Cc: pbonzini@redhat.com, yzt356@gmail.com
> -----Original Message-----
> From: Gleb Natapov [mailto:gleb@redhat.com]
> Sent: Sunday, August 04, 2013 8:08 PM
> To: kvm@vger.kernel.org
> Cc: Ren, Yongjie; pbonzini@redhat.com; yzt356@gmail.com
> Subject: [PATCH] KVM: nVMX: correctly set tr base on nested vmexit
> emulation
>
> 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
>
Yes, your patch can fix this bug I reported.
Tested-by: Yongjie Ren <yongjie.ren@intel.com>
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: nVMX: correctly set tr base on nested vmexit emulation
2013-08-04 12:08 [PATCH] KVM: nVMX: correctly set tr base on nested vmexit emulation Gleb Natapov
2013-08-04 12:21 ` Arthur Chunqi Li
2013-08-05 6:23 ` Ren, Yongjie
@ 2013-08-07 14:07 ` Paolo Bonzini
2 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2013-08-07 14:07 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm, Ren, Yongjie, yzt356
On 08/04/2013 02: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 <gleb@redhat.com>
> 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.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Applied, thanks.
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-07 14:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-04 12:08 [PATCH] KVM: nVMX: correctly set tr base on nested vmexit emulation Gleb Natapov
2013-08-04 12:21 ` Arthur Chunqi Li
2013-08-04 12:59 ` Gleb Natapov
2013-08-05 6:23 ` Ren, Yongjie
2013-08-07 14:07 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).