summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorSheng Yang <sheng.yang@intel.com>2008-09-11 15:27:49 +0800
committerAvi Kivity <avi@qumranet.com>2008-10-15 10:16:14 +0200
commit9ea542facbd0fd12a53e169953a3fdd6d0364532 (patch)
tree0447a5aa4b6ffc689731ad018cb3a46b27bf60e0 /arch/x86/kvm
parentad8003d33efe856515a5c2e9b63637de85c44788 (diff)
downloadop-kernel-dev-9ea542facbd0fd12a53e169953a3fdd6d0364532.zip
op-kernel-dev-9ea542facbd0fd12a53e169953a3fdd6d0364532.tar.gz
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/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 f8e615f..046a91b 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)
u64 msr;
rdmsrl(MSR_IA32_FEATURE_CONTROL, msr);
- return (msr & (IA32_FEATURE_CONTROL_LOCKED_BIT |
- IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT))
- == IA32_FEATURE_CONTROL_LOCKED_BIT;
+ return (msr & (FEATURE_CONTROL_LOCKED |
+ FEATURE_CONTROL_VMXON_ENABLED))
+ == FEATURE_CONTROL_LOCKED;
/* locked but not enabled */
}
@@ -1055,14 +1055,14 @@ static void hardware_enable(void *garbage)
INIT_LIST_HEAD(&per_cpu(vcpus_on_cpu, cpu));
rdmsrl(MSR_IA32_FEATURE_CONTROL, old);
- if ((old & (IA32_FEATURE_CONTROL_LOCKED_BIT |
- IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT))
- != (IA32_FEATURE_CONTROL_LOCKED_BIT |
- IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT))
+ if ((old & (FEATURE_CONTROL_LOCKED |
+ FEATURE_CONTROL_VMXON_ENABLED))
+ != (FEATURE_CONTROL_LOCKED |
+ FEATURE_CONTROL_VMXON_ENABLED))
/* enable and lock */
wrmsrl(MSR_IA32_FEATURE_CONTROL, old |
- IA32_FEATURE_CONTROL_LOCKED_BIT |
- IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT);
+ FEATURE_CONTROL_LOCKED |
+ FEATURE_CONTROL_VMXON_ENABLED);
write_cr4(read_cr4() | X86_CR4_VMXE); /* FIXME: not cpu hotplug safe */
asm volatile (ASM_VMX_VMXON_RAX
: : "a"(&phys_addr), "m"(phys_addr)
diff --git a/arch/x86/kvm/vmx.h b/arch/x86/kvm/vmx.h
index 86059f4..44cfab7 100644
--- a/arch/x86/kvm/vmx.h
+++ b/arch/x86/kvm/vmx.h
@@ -331,8 +331,8 @@ enum vmcs_field {
#define AR_RESERVD_MASK 0xfffe0f00
-#define IA32_FEATURE_CONTROL_LOCKED_BIT 0x1
-#define IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT 0x4
+#define FEATURE_CONTROL_LOCKED (1<<0)
+#define FEATURE_CONTROL_VMXON_ENABLED (1<<2)
#define APIC_ACCESS_PAGE_PRIVATE_MEMSLOT 9
#define IDENTITY_PAGETABLE_PRIVATE_MEMSLOT 10
OpenPOWER on IntegriCloud