]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: VMX: Rename misnamed msr bits
authorSheng Yang <sheng.yang@intel.com>
Tue, 24 Jun 2008 09:02:38 +0000 (17:02 +0800)
committerAvi Kivity <avi@qumranet.com>
Wed, 15 Oct 2008 08:13:57 +0000 (10:13 +0200)
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>
arch/x86/kvm/vmx.c
arch/x86/kvm/vmx.h

index 7041cc52b562eccc98f4a5fd060390709bc915b4..81dac721ec318d083bd43d130efb407dfdef10b5 100644 (file)
@@ -1031,9 +1031,9 @@ static __init int vmx_disabled_by_bios(void)
        u64 msr;
 
        rdmsrl(MSR_IA32_FEATURE_CONTROL, msr);
-       return (msr & (MSR_IA32_FEATURE_CONTROL_LOCKED |
-                      MSR_IA32_FEATURE_CONTROL_VMXON_ENABLED))
-           == MSR_IA32_FEATURE_CONTROL_LOCKED;
+       return (msr & (IA32_FEATURE_CONTROL_LOCKED_BIT |
+                      IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT))
+           == IA32_FEATURE_CONTROL_LOCKED_BIT;
        /* locked but not enabled */
 }
 
@@ -1045,14 +1045,14 @@ static void hardware_enable(void *garbage)
 
        INIT_LIST_HEAD(&per_cpu(vcpus_on_cpu, cpu));
        rdmsrl(MSR_IA32_FEATURE_CONTROL, old);
-       if ((old & (MSR_IA32_FEATURE_CONTROL_LOCKED |
-                   MSR_IA32_FEATURE_CONTROL_VMXON_ENABLED))
-           != (MSR_IA32_FEATURE_CONTROL_LOCKED |
-               MSR_IA32_FEATURE_CONTROL_VMXON_ENABLED))
+       if ((old & (IA32_FEATURE_CONTROL_LOCKED_BIT |
+                   IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT))
+           != (IA32_FEATURE_CONTROL_LOCKED_BIT |
+               IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT))
                /* enable and lock */
                wrmsrl(MSR_IA32_FEATURE_CONTROL, old |
-                      MSR_IA32_FEATURE_CONTROL_LOCKED |
-                      MSR_IA32_FEATURE_CONTROL_VMXON_ENABLED);
+                      IA32_FEATURE_CONTROL_LOCKED_BIT |
+                      IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT);
        write_cr4(read_cr4() | X86_CR4_VMXE); /* FIXME: not cpu hotplug safe */
        asm volatile (ASM_VMX_VMXON_RAX
                      : : "a"(&phys_addr), "m"(phys_addr)
index 17e25995b65b62986ec2d4bbff7f7e9ce6d162f6..86059f439cb4af389ef540a2dd9464fd608e1b24 100644 (file)
@@ -331,8 +331,8 @@ enum vmcs_field {
 
 #define AR_RESERVD_MASK 0xfffe0f00
 
-#define MSR_IA32_FEATURE_CONTROL_LOCKED         0x1
-#define MSR_IA32_FEATURE_CONTROL_VMXON_ENABLED  0x4
+#define IA32_FEATURE_CONTROL_LOCKED_BIT                0x1
+#define IA32_FEATURE_CONTROL_VMXON_ENABLED_BIT 0x4
 
 #define APIC_ACCESS_PAGE_PRIVATE_MEMSLOT       9
 #define IDENTITY_PAGETABLE_PRIVATE_MEMSLOT     10