diff options
author | Sheng Yang <sheng.yang@intel.com> | 2008-09-11 03:27:49 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-10-15 04:16:14 -0400 |
commit | 9ea542facbd0fd12a53e169953a3fdd6d0364532 (patch) | |
tree | 0447a5aa4b6ffc689731ad018cb3a46b27bf60e0 /arch | |
parent | ad8003d33efe856515a5c2e9b63637de85c44788 (diff) |
KVM: VMX: Rename IA32_FEATURE_CONTROL bits
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/vmx.c | 18 | ||||
-rw-r--r-- | arch/x86/kvm/vmx.h | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index f8e615fc8744..046a91b5a4ba 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -1041,9 +1041,9 @@ static __init int vmx_disabled_by_bios(void) | |||
1041 | u64 msr; | 1041 | u64 msr; |
1042 | 1042 | ||
1043 | rdmsrl(MSR_IA32_FEATURE_CONTROL, msr); | 1043 | rdmsrl(MSR_IA32_FEATURE_CONTROL, msr); |
1044 | return (msr & (IA32_FEATURE_CONTROL_LOCKED_BIT | | 1044 | return (msr & (FEATURE_CONTROL_LOCKED | |
1045 | IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT)) | 1045 | FEATURE_CONTROL_VMXON_ENABLED)) |
1046 | == IA32_FEATURE_CONTROL_LOCKED_BIT; | 1046 | == FEATURE_CONTROL_LOCKED; |
1047 | /* locked but not enabled */ | 1047 | /* locked but not enabled */ |
1048 | } | 1048 | } |
1049 | 1049 | ||
@@ -1055,14 +1055,14 @@ static void hardware_enable(void *garbage) | |||
1055 | 1055 | ||
1056 | INIT_LIST_HEAD(&per_cpu(vcpus_on_cpu, cpu)); | 1056 | INIT_LIST_HEAD(&per_cpu(vcpus_on_cpu, cpu)); |
1057 | rdmsrl(MSR_IA32_FEATURE_CONTROL, old); | 1057 | rdmsrl(MSR_IA32_FEATURE_CONTROL, old); |
1058 | if ((old & (IA32_FEATURE_CONTROL_LOCKED_BIT | | 1058 | if ((old & (FEATURE_CONTROL_LOCKED | |
1059 | IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT)) | 1059 | FEATURE_CONTROL_VMXON_ENABLED)) |
1060 | != (IA32_FEATURE_CONTROL_LOCKED_BIT | | 1060 | != (FEATURE_CONTROL_LOCKED | |
1061 | IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT)) | 1061 | FEATURE_CONTROL_VMXON_ENABLED)) |
1062 | /* enable and lock */ | 1062 | /* enable and lock */ |
1063 | wrmsrl(MSR_IA32_FEATURE_CONTROL, old | | 1063 | wrmsrl(MSR_IA32_FEATURE_CONTROL, old | |
1064 | IA32_FEATURE_CONTROL_LOCKED_BIT | | 1064 | FEATURE_CONTROL_LOCKED | |
1065 | IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT); | 1065 | FEATURE_CONTROL_VMXON_ENABLED); |
1066 | write_cr4(read_cr4() | X86_CR4_VMXE); /* FIXME: not cpu hotplug safe */ | 1066 | write_cr4(read_cr4() | X86_CR4_VMXE); /* FIXME: not cpu hotplug safe */ |
1067 | asm volatile (ASM_VMX_VMXON_RAX | 1067 | asm volatile (ASM_VMX_VMXON_RAX |
1068 | : : "a"(&phys_addr), "m"(phys_addr) | 1068 | : : "a"(&phys_addr), "m"(phys_addr) |
diff --git a/arch/x86/kvm/vmx.h b/arch/x86/kvm/vmx.h index 86059f439cb4..44cfab706443 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 IA32_FEATURE_CONTROL_LOCKED_BIT 0x1 | 334 | #define FEATURE_CONTROL_LOCKED (1<<0) |
335 | #define IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT 0x4 | 335 | #define FEATURE_CONTROL_VMXON_ENABLED (1<<2) |
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 |