summaryrefslogtreecommitdiff
path: root/kvm_vmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'kvm_vmx.c')
-rw-r--r--kvm_vmx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kvm_vmx.c b/kvm_vmx.c
index 81291f1..c8f4b00 100644
--- a/kvm_vmx.c
+++ b/kvm_vmx.c
@@ -856,13 +856,15 @@ vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
vcpu->cpu = cpu;
/*
- * We have a per-CPU TSS, GDT and GSBASE -- so we reset these
- * in the VMCS when switching CPUs.
+ * We have a per-CPU TSS, GDT, IDT and GSBASE -- so we reset
+ * these in the VMCS when switching CPUs.
*/
vmcs_writel(HOST_TR_BASE, kvm_read_tr_base()); /* 22.2.4 */
kvm_get_gdt(&dt);
vmcs_writel(HOST_GDTR_BASE, dt.base); /* 22.2.4 */
vmcs_writel(HOST_GS_BASE, read_msr(MSR_GS_BASE));
+ kvm_get_idt(&dt);
+ vmcs_writel(HOST_IDTR_BASE, dt.base);
rdmsrl(MSR_IA32_SYSENTER_ESP, sysenter_esp);
vmcs_writel(HOST_IA32_SYSENTER_ESP, sysenter_esp); /* 22.2.3 */