From 410f6ac013cc3faf421b9d7b2732de075c16f44c Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 13 May 2012 19:53:23 +0300 Subject: [PATCH] --- yaml --- r: 307905 b: refs/heads/master c: 512d5649e8dc3ed36f2ebf0818da64a4d4c2544a h: refs/heads/master i: 307903: f566fa002d3f5f793371b2610feca928740b5094 v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/vmx.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index b068f3827b5f..8c3c38359ba3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d54e4237bcbb400fda11c902fd538aa0b4805720 +refs/heads/master: 512d5649e8dc3ed36f2ebf0818da64a4d4c2544a diff --git a/trunk/arch/x86/kvm/vmx.c b/trunk/arch/x86/kvm/vmx.c index 3062ea95266e..f2ee016e1004 100644 --- a/trunk/arch/x86/kvm/vmx.c +++ b/trunk/arch/x86/kvm/vmx.c @@ -6102,7 +6102,10 @@ static void atomic_switch_perf_msrs(struct vcpu_vmx *vmx) static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); + u16 _ds, _es; + savesegment(ds, _ds); + savesegment(es, _es); if (is_guest_mode(vcpu) && !vmx->nested.nested_run_pending) { struct vmcs12 *vmcs12 = get_vmcs12(vcpu); if (vmcs12->idt_vectoring_info_field & @@ -6263,7 +6266,8 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) } } - asm("mov %0, %%ds; mov %0, %%es" : : "r"(__USER_DS)); + loadsegment(ds, _ds); + loadsegment(es, _es); vmx->loaded_vmcs->launched = 1; vmx->exit_reason = vmcs_read32(VM_EXIT_REASON);