summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Cantrill <bryan@joyent.com>2011-08-20 00:18:54 -0700
committerBryan Cantrill <bryan@joyent.com>2011-08-20 00:18:54 -0700
commit80ebdaa1aa900c31b360e88ae394a48a6fce5486 (patch)
treee679862d4f62a273813238103f5197c7ebd68973
parent6b59b5b4066e37f60d2d61fdfeb2700c596118a7 (diff)
downloadillumos-kvm-80ebdaa1aa900c31b360e88ae394a48a6fce5486.tar.gz
HVM-611 per-CPU IDT not properly restored, breaking S10-branded zones
-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 */