aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/msr-index.h2
-rw-r--r--arch/x86/kvm/svm.c6
-rw-r--r--arch/x86/kvm/vmx.c8
-rw-r--r--arch/x86/kvm/x86.c2
4 files changed, 8 insertions, 10 deletions
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index 8c7ae4318629..6068e0e06e00 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -159,8 +159,6 @@
159#define MSR_K7_FID_VID_STATUS 0xc0010042 159#define MSR_K7_FID_VID_STATUS 0xc0010042
160 160
161/* K6 MSRs */ 161/* K6 MSRs */
162#define MSR_K6_EFER 0xc0000080
163#define MSR_K6_STAR 0xc0000081
164#define MSR_K6_WHCR 0xc0000082 162#define MSR_K6_WHCR 0xc0000082
165#define MSR_K6_UWCCR 0xc0000085 163#define MSR_K6_UWCCR 0xc0000085
166#define MSR_K6_EPMR 0xc0000086 164#define MSR_K6_EPMR 0xc0000086
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index ce438e0fdd26..24a220696298 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -130,7 +130,7 @@ static struct svm_direct_access_msrs {
130 u32 index; /* Index of the MSR */ 130 u32 index; /* Index of the MSR */
131 bool always; /* True if intercept is always on */ 131 bool always; /* True if intercept is always on */
132} direct_access_msrs[] = { 132} direct_access_msrs[] = {
133 { .index = MSR_K6_STAR, .always = true }, 133 { .index = MSR_STAR, .always = true },
134 { .index = MSR_IA32_SYSENTER_CS, .always = true }, 134 { .index = MSR_IA32_SYSENTER_CS, .always = true },
135#ifdef CONFIG_X86_64 135#ifdef CONFIG_X86_64
136 { .index = MSR_GS_BASE, .always = true }, 136 { .index = MSR_GS_BASE, .always = true },
@@ -2431,7 +2431,7 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data)
2431 *data = tsc_offset + native_read_tsc(); 2431 *data = tsc_offset + native_read_tsc();
2432 break; 2432 break;
2433 } 2433 }
2434 case MSR_K6_STAR: 2434 case MSR_STAR:
2435 *data = svm->vmcb->save.star; 2435 *data = svm->vmcb->save.star;
2436 break; 2436 break;
2437#ifdef CONFIG_X86_64 2437#ifdef CONFIG_X86_64
@@ -2555,7 +2555,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)
2555 2555
2556 break; 2556 break;
2557 } 2557 }
2558 case MSR_K6_STAR: 2558 case MSR_STAR:
2559 svm->vmcb->save.star = data; 2559 svm->vmcb->save.star = data;
2560 break; 2560 break;
2561#ifdef CONFIG_X86_64 2561#ifdef CONFIG_X86_64
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 }
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 05d571f6f196..6127468ebbd2 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -671,7 +671,7 @@ static u32 msrs_to_save[] = {
671 HV_X64_MSR_GUEST_OS_ID, HV_X64_MSR_HYPERCALL, 671 HV_X64_MSR_GUEST_OS_ID, HV_X64_MSR_HYPERCALL,
672 HV_X64_MSR_APIC_ASSIST_PAGE, 672 HV_X64_MSR_APIC_ASSIST_PAGE,
673 MSR_IA32_SYSENTER_CS, MSR_IA32_SYSENTER_ESP, MSR_IA32_SYSENTER_EIP, 673 MSR_IA32_SYSENTER_CS, MSR_IA32_SYSENTER_ESP, MSR_IA32_SYSENTER_EIP,
674 MSR_K6_STAR, 674 MSR_STAR,
675#ifdef CONFIG_X86_64 675#ifdef CONFIG_X86_64
676 MSR_CSTAR, MSR_KERNEL_GS_BASE, MSR_SYSCALL_MASK, MSR_LSTAR, 676 MSR_CSTAR, MSR_KERNEL_GS_BASE, MSR_SYSCALL_MASK, MSR_LSTAR,
677#endif 677#endif