aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r--drivers/kvm/vmx.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 184238e2ece4..c1ac106ace8c 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -280,6 +280,7 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu)
280 280
281static void vmx_vcpu_put(struct kvm_vcpu *vcpu) 281static void vmx_vcpu_put(struct kvm_vcpu *vcpu)
282{ 282{
283 kvm_put_guest_fpu(vcpu);
283 put_cpu(); 284 put_cpu();
284} 285}
285 286
@@ -1847,10 +1848,8 @@ again:
1847 if (vcpu->guest_debug.enabled) 1848 if (vcpu->guest_debug.enabled)
1848 kvm_guest_debug_pre(vcpu); 1849 kvm_guest_debug_pre(vcpu);
1849 1850
1850 if (vcpu->fpu_active) { 1851 kvm_load_guest_fpu(vcpu);
1851 fx_save(vcpu->host_fx_image); 1852
1852 fx_restore(vcpu->guest_fx_image);
1853 }
1854 /* 1853 /*
1855 * Loading guest fpu may have cleared host cr0.ts 1854 * Loading guest fpu may have cleared host cr0.ts
1856 */ 1855 */
@@ -2012,11 +2011,6 @@ again:
2012 } 2011 }
2013#endif 2012#endif
2014 2013
2015 if (vcpu->fpu_active) {
2016 fx_save(vcpu->guest_fx_image);
2017 fx_restore(vcpu->host_fx_image);
2018 }
2019
2020 vcpu->interrupt_window_open = (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0; 2014 vcpu->interrupt_window_open = (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0;
2021 2015
2022 asm ("mov %0, %%ds; mov %0, %%es" : : "r"(__USER_DS)); 2016 asm ("mov %0, %%ds; mov %0, %%es" : : "r"(__USER_DS));