aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorSheng Yang <sheng.yang@intel.com>2008-06-24 05:02:38 -0400
committerAvi Kivity <avi@qumranet.com>2008-10-15 04:13:57 -0400
commitca60dfbb69afb549e33527cbf676e4daf8febfb5 (patch)
tree3e2b04abe0f6054679121b23fcc31c4d8d54cbff /arch/x86/kvm
parent278429cff8809958d25415ba0ed32b59866ab1a8 (diff)
KVM: VMX: Rename misnamed msr bits
MSR_IA32_FEATURE_LOCKED is just a bit in fact, which shouldn't be prefixed with MSR_. So is MSR_IA32_FEATURE_VMXON_ENABLED. Signed-off-by: Sheng Yang <sheng.yang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/vmx.c18
-rw-r--r--arch/x86/kvm/vmx.h4
2 files changed, 11 insertions, 11 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 7041cc52b562..81dac721ec31 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1031,9 +1031,9 @@ static __init int vmx_disabled_by_bios(void)
1031 u64 msr; 1031 u64 msr;
1032 1032
1033 rdmsrl(MSR_IA32_FEATURE_CONTROL, msr); 1033 rdmsrl(MSR_IA32_FEATURE_CONTROL, msr);
1034 return (msr & (MSR_IA32_FEATURE_CONTROL_LOCKED | 1034 return (msr & (IA32_FEATURE_CONTROL_LOCKED_BIT |
1035 MSR_IA32_FEATURE_CONTROL_VMXON_ENABLED)) 1035 IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT))
1036 == MSR_IA32_FEATURE_CONTROL_LOCKED; 1036 == IA32_FEATURE_CONTROL_LOCKED_BIT;
1037 /* locked but not enabled */ 1037 /* locked but not enabled */
1038} 1038}
1039 1039
@@ -1045,14 +1045,14 @@ static void hardware_enable(void *garbage)
1045 1045
1046 INIT_LIST_HEAD(&per_cpu(vcpus_on_cpu, cpu)); 1046 INIT_LIST_HEAD(&per_cpu(vcpus_on_cpu, cpu));
1047 rdmsrl(MSR_IA32_FEATURE_CONTROL, old); 1047 rdmsrl(MSR_IA32_FEATURE_CONTROL, old);
1048 if ((old & (MSR_IA32_FEATURE_CONTROL_LOCKED | 1048 if ((old & (IA32_FEATURE_CONTROL_LOCKED_BIT |
1049 MSR_IA32_FEATURE_CONTROL_VMXON_ENABLED)) 1049 IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT))
1050 != (MSR_IA32_FEATURE_CONTROL_LOCKED | 1050 != (IA32_FEATURE_CONTROL_LOCKED_BIT |
1051 MSR_IA32_FEATURE_CONTROL_VMXON_ENABLED)) 1051 IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT))
1052 /* enable and lock */ 1052 /* enable and lock */
1053 wrmsrl(MSR_IA32_FEATURE_CONTROL, old | 1053 wrmsrl(MSR_IA32_FEATURE_CONTROL, old |
1054 MSR_IA32_FEATURE_CONTROL_LOCKED | 1054 IA32_FEATURE_CONTROL_LOCKED_BIT |
1055 MSR_IA32_FEATURE_CONTROL_VMXON_ENABLED); 1055 IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT);
1056 write_cr4(read_cr4() | X86_CR4_VMXE); /* FIXME: not cpu hotplug safe */ 1056 write_cr4(read_cr4() | X86_CR4_VMXE); /* FIXME: not cpu hotplug safe */
1057 asm volatile (ASM_VMX_VMXON_RAX 1057 asm volatile (ASM_VMX_VMXON_RAX
1058 : : "a"(&phys_addr), "m"(phys_addr) 1058 : : "a"(&phys_addr), "m"(phys_addr)
diff --git a/arch/x86/kvm/vmx.h b/arch/x86/kvm/vmx.h
index 17e25995b65b..86059f439cb4 100644
--- a/arch/x86/kvm/vmx.h
+++ b/arch/x86/kvm/vmx.h
@@ -331,8 +331,8 @@ enum vmcs_field {
331 331
332#define AR_RESERVD_MASK 0xfffe0f00 332#define AR_RESERVD_MASK 0xfffe0f00
333 333
334#define MSR_IA32_FEATURE_CONTROL_LOCKED 0x1 334#define IA32_FEATURE_CONTROL_LOCKED_BIT 0x1
335#define MSR_IA32_FEATURE_CONTROL_VMXON_ENABLED 0x4 335#define IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT 0x4
336 336
337#define APIC_ACCESS_PAGE_PRIVATE_MEMSLOT 9 337#define APIC_ACCESS_PAGE_PRIVATE_MEMSLOT 9
338#define IDENTITY_PAGETABLE_PRIVATE_MEMSLOT 10 338#define IDENTITY_PAGETABLE_PRIVATE_MEMSLOT 10