Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205481
b: refs/heads/master
c: d3608b5
h: refs/heads/master
i:
  205479: f146fc1
v: v3
  • Loading branch information
H. Peter Anvin committed Jul 28, 2010
1 parent 40227ab commit 665a001
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 113fc5a6e8c2288619ff7e8187a6f556b7e0d372
refs/heads/master: d3608b5681d238605b7da6be62244e803e24c649
2 changes: 0 additions & 2 deletions trunk/arch/x86/include/asm/msr-index.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@
#define MSR_K7_FID_VID_STATUS 0xc0010042

/* K6 MSRs */
#define MSR_K6_EFER 0xc0000080
#define MSR_K6_STAR 0xc0000081
#define MSR_K6_WHCR 0xc0000082
#define MSR_K6_UWCCR 0xc0000085
#define MSR_K6_EPMR 0xc0000086
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/acpi/realmode/wakeup.S
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ _start:
movl %eax, %ecx
orl %edx, %ecx
jz 1f
movl $0xc0000080, %ecx
movl $MSR_EFER, %ecx
wrmsr
1:

Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/x86/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,8 @@ ENTRY(secondary_startup_64)
* init data section till per cpu areas are set up.
*/
movl $MSR_GS_BASE,%ecx
movq initial_gs(%rip),%rax
movq %rax,%rdx
shrq $32,%rdx
movl initial_gs(%rip),%eax
movl initial_gs+4(%rip),%edx
wrmsr

/* esi is pointer to real mode structure with interesting info.
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/x86/kernel/verify_cpu_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
*/

#include <asm/cpufeature.h>
#include <asm/msr-index.h>

verify_cpu:
pushfl # Save caller passed flags
Expand Down Expand Up @@ -88,7 +89,7 @@ verify_cpu_sse_test:
je verify_cpu_sse_ok
test %di,%di
jz verify_cpu_no_longmode # only try to force SSE on AMD
movl $0xc0010015,%ecx # HWCR
movl $MSR_K7_HWCR,%ecx
rdmsr
btr $15,%eax # enable SSE
wrmsr
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static struct svm_direct_access_msrs {
u32 index; /* Index of the MSR */
bool always; /* True if intercept is always on */
} direct_access_msrs[] = {
{ .index = MSR_K6_STAR, .always = true },
{ .index = MSR_STAR, .always = true },
{ .index = MSR_IA32_SYSENTER_CS, .always = true },
#ifdef CONFIG_X86_64
{ .index = MSR_GS_BASE, .always = true },
Expand Down Expand Up @@ -2431,7 +2431,7 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data)
*data = tsc_offset + native_read_tsc();
break;
}
case MSR_K6_STAR:
case MSR_STAR:
*data = svm->vmcb->save.star;
break;
#ifdef CONFIG_X86_64
Expand Down Expand Up @@ -2555,7 +2555,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)

break;
}
case MSR_K6_STAR:
case MSR_STAR:
svm->vmcb->save.star = data;
break;
#ifdef CONFIG_X86_64
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,14 @@ static u64 host_efer;
static void ept_save_pdptrs(struct kvm_vcpu *vcpu);

/*
* Keep MSR_K6_STAR at the end, as setup_msrs() will try to optimize it
* Keep MSR_STAR at the end, as setup_msrs() will try to optimize it
* away by decrementing the array size.
*/
static const u32 vmx_msr_index[] = {
#ifdef CONFIG_X86_64
MSR_SYSCALL_MASK, MSR_LSTAR, MSR_CSTAR,
#endif
MSR_EFER, MSR_TSC_AUX, MSR_K6_STAR,
MSR_EFER, MSR_TSC_AUX, MSR_STAR,
};
#define NR_VMX_MSR ARRAY_SIZE(vmx_msr_index)

Expand Down Expand Up @@ -1057,10 +1057,10 @@ static void setup_msrs(struct vcpu_vmx *vmx)
if (index >= 0 && vmx->rdtscp_enabled)
move_msr_up(vmx, index, save_nmsrs++);
/*
* MSR_K6_STAR is only needed on long mode guests, and only
* MSR_STAR is only needed on long mode guests, and only
* if efer.sce is enabled.
*/
index = __find_msr_index(vmx, MSR_K6_STAR);
index = __find_msr_index(vmx, MSR_STAR);
if ((index >= 0) && (vmx->vcpu.arch.efer & EFER_SCE))
move_msr_up(vmx, index, save_nmsrs++);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ static u32 msrs_to_save[] = {
HV_X64_MSR_GUEST_OS_ID, HV_X64_MSR_HYPERCALL,
HV_X64_MSR_APIC_ASSIST_PAGE,
MSR_IA32_SYSENTER_CS, MSR_IA32_SYSENTER_ESP, MSR_IA32_SYSENTER_EIP,
MSR_K6_STAR,
MSR_STAR,
#ifdef CONFIG_X86_64
MSR_CSTAR, MSR_KERNEL_GS_BASE, MSR_SYSCALL_MASK, MSR_LSTAR,
#endif
Expand Down

0 comments on commit 665a001

Please sign in to comment.