diff mbox series

[v2,3/4] kvm: vmx: Don't set hardware IA32_CSTAR MSR on VM-entry

Message ID 20181109222131.60885-2-jmattson@google.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/4] kvm: vmx: Set IA32_TSC_AUX for legacy mode guests | expand

Commit Message

Jim Mattson Nov. 9, 2018, 10:21 p.m. UTC
SYSCALL isn't supported in compatibility mode on Intel CPUs, so
IA32_CSTAR is not used (except as 48 bits of storage). It's pointless
to load the guest's IA32_CSTAR value into the hardware MSR.

Note that we continue to enumerate the MSR in vmx_msr_index[] to
provide the aforementioned 48 bits of storage.

Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Reviewed-by: Marc Orr <marcorr@google.com>
---
 arch/x86/kvm/vmx.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index da7f43457d49..88692f0b83b1 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3406,9 +3406,6 @@  static void setup_msrs(struct vcpu_vmx *vmx)
 		if (index >= 0)
 			move_msr_up(vmx, index, save_nmsrs++);
 		index = __find_msr_index(vmx, MSR_LSTAR);
-		if (index >= 0)
-			move_msr_up(vmx, index, save_nmsrs++);
-		index = __find_msr_index(vmx, MSR_CSTAR);
 		if (index >= 0)
 			move_msr_up(vmx, index, save_nmsrs++);
 		/*