diff options
| -rw-r--r-- | arch/x86/kvm/vmx.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d13073c841ff..3dbbf4ec471f 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
| @@ -2086,13 +2086,6 @@ static unsigned long segment_base(u16 selector) | |||
| 2086 | return v; | 2086 | return v; |
| 2087 | } | 2087 | } |
| 2088 | 2088 | ||
| 2089 | static inline unsigned long kvm_read_tr_base(void) | ||
| 2090 | { | ||
| 2091 | u16 tr; | ||
| 2092 | asm("str %0" : "=g"(tr)); | ||
| 2093 | return segment_base(tr); | ||
| 2094 | } | ||
| 2095 | |||
| 2096 | static void vmx_save_host_state(struct kvm_vcpu *vcpu) | 2089 | static void vmx_save_host_state(struct kvm_vcpu *vcpu) |
| 2097 | { | 2090 | { |
| 2098 | struct vcpu_vmx *vmx = to_vmx(vcpu); | 2091 | struct vcpu_vmx *vmx = to_vmx(vcpu); |
| @@ -2292,10 +2285,11 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
| 2292 | 2285 | ||
| 2293 | /* | 2286 | /* |
| 2294 | * Linux uses per-cpu TSS and GDT, so set these when switching | 2287 | * Linux uses per-cpu TSS and GDT, so set these when switching |
| 2295 | * processors. | 2288 | * processors. See 22.2.4. |
| 2296 | */ | 2289 | */ |
| 2297 | vmcs_writel(HOST_TR_BASE, kvm_read_tr_base()); /* 22.2.4 */ | 2290 | vmcs_writel(HOST_TR_BASE, |
| 2298 | vmcs_writel(HOST_GDTR_BASE, gdt->address); /* 22.2.4 */ | 2291 | (unsigned long)this_cpu_ptr(&cpu_tss)); |
| 2292 | vmcs_writel(HOST_GDTR_BASE, gdt->address); | ||
| 2299 | 2293 | ||
| 2300 | rdmsrl(MSR_IA32_SYSENTER_ESP, sysenter_esp); | 2294 | rdmsrl(MSR_IA32_SYSENTER_ESP, sysenter_esp); |
| 2301 | vmcs_writel(HOST_IA32_SYSENTER_ESP, sysenter_esp); /* 22.2.3 */ | 2295 | vmcs_writel(HOST_IA32_SYSENTER_ESP, sysenter_esp); /* 22.2.3 */ |
