aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2010-07-17 09:03:26 -0400
committerH. Peter Anvin <hpa@zytor.com>2010-07-22 00:23:05 -0400
commit8c06585d6431addadd94903843dfbcd315b42d4e (patch)
tree4d673e4d190361e2d73aa06980601ac57a100b59 /arch/x86/kvm/vmx.c
parentcd5b8f8755a89a57fc8c408d284b8b613f090345 (diff)
x86: Remove redundant K6 MSRs
MSR_K6_EFER is unused, and MSR_K6_STAR is redundant with MSR_STAR. Signed-off-by: Brian Gerst <brgerst@gmail.com> LKML-Reference: <1279371808-24804-1-git-send-email-brgerst@gmail.com> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index ee03679efe78..b42ad25d5647 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -231,14 +231,14 @@ static u64 host_efer;
231static void ept_save_pdptrs(struct kvm_vcpu *vcpu); 231static void ept_save_pdptrs(struct kvm_vcpu *vcpu);
232 232
233/* 233/*
234 * Keep MSR_K6_STAR at the end, as setup_msrs() will try to optimize it 234 * Keep MSR_STAR at the end, as setup_msrs() will try to optimize it
235 * away by decrementing the array size. 235 * away by decrementing the array size.
236 */ 236 */
237static const u32 vmx_msr_index[] = { 237static const u32 vmx_msr_index[] = {
238#ifdef CONFIG_X86_64 238#ifdef CONFIG_X86_64
239 MSR_SYSCALL_MASK, MSR_LSTAR, MSR_CSTAR, 239 MSR_SYSCALL_MASK, MSR_LSTAR, MSR_CSTAR,
240#endif 240#endif
241 MSR_EFER, MSR_TSC_AUX, MSR_K6_STAR, 241 MSR_EFER, MSR_TSC_AUX, MSR_STAR,
242}; 242};
243#define NR_VMX_MSR ARRAY_SIZE(vmx_msr_index) 243#define NR_VMX_MSR ARRAY_SIZE(vmx_msr_index)
244 244
@@ -1057,10 +1057,10 @@ static void setup_msrs(struct vcpu_vmx *vmx)
1057 if (index >= 0 && vmx->rdtscp_enabled) 1057 if (index >= 0 && vmx->rdtscp_enabled)
1058 move_msr_up(vmx, index, save_nmsrs++); 1058 move_msr_up(vmx, index, save_nmsrs++);
1059 /* 1059 /*
1060 * MSR_K6_STAR is only needed on long mode guests, and only 1060 * MSR_STAR is only needed on long mode guests, and only
1061 * if efer.sce is enabled. 1061 * if efer.sce is enabled.
1062 */ 1062 */
1063 index = __find_msr_index(vmx, MSR_K6_STAR); 1063 index = __find_msr_index(vmx, MSR_STAR);
1064 if ((index >= 0) && (vmx->vcpu.arch.efer & EFER_SCE)) 1064 if ((index >= 0) && (vmx->vcpu.arch.efer & EFER_SCE))
1065 move_msr_up(vmx, index, save_nmsrs++); 1065 move_msr_up(vmx, index, save_nmsrs++);
1066 } 1066 }