x86/cpufeature: Remove cpu_has_hypervisor
authorBorislav Petkov <bp@suse.de>
Tue, 29 Mar 2016 15:41:55 +0000 (17:41 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 31 Mar 2016 11:35:07 +0000 (13:35 +0200)
Use boot_cpu_has() instead.

Tested-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: sparmaintainer@unisys.com
Cc: virtualization@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/1459266123-21878-3-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/intel/uncore.c
arch/x86/include/asm/cpufeature.h
arch/x86/kernel/cpu/vmware.c
arch/x86/kernel/kvm.c
drivers/staging/unisys/visorbus/visorchipset.c

index 7012d18bb293073e7cf0021cab79c50e3e42289c..3f6d8b5672d5c6cbf497946d4e04ae1854e93db1 100644 (file)
@@ -1383,7 +1383,7 @@ static int __init intel_uncore_init(void)
        if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
                return -ENODEV;
 
-       if (cpu_has_hypervisor)
+       if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
                return -ENODEV;
 
        max_packages = topology_max_packages();
index fee7a6efcd2da98b24fa96e584b564d9169ea48f..3aea54ecabfda6f459bd3e3e8bfd2bd3f2063bf1 100644 (file)
@@ -136,7 +136,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
 #define cpu_has_xsave          boot_cpu_has(X86_FEATURE_XSAVE)
 #define cpu_has_xsaves         boot_cpu_has(X86_FEATURE_XSAVES)
 #define cpu_has_osxsave                boot_cpu_has(X86_FEATURE_OSXSAVE)
-#define cpu_has_hypervisor     boot_cpu_has(X86_FEATURE_HYPERVISOR)
 /*
  * Do not add any more of those clumsy macros - use static_cpu_has() for
  * fast paths and boot_cpu_has() otherwise!
index 364e5834689753fc7da34c6dc8a34cca22ab92db..8cac429b6a1d53255899e84459ab9436d3df4100 100644 (file)
@@ -94,7 +94,7 @@ static void __init vmware_platform_setup(void)
  */
 static uint32_t __init vmware_platform(void)
 {
-       if (cpu_has_hypervisor) {
+       if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) {
                unsigned int eax;
                unsigned int hyper_vendor_id[3];
 
index 807950860fb7028e28fe1e98d8a2cddeccfa8063..dc1207e2f19390a7f3dbe5efa967ac008f19da58 100644 (file)
@@ -522,7 +522,7 @@ static noinline uint32_t __kvm_cpuid_base(void)
        if (boot_cpu_data.cpuid_level < 0)
                return 0;       /* So we don't blow up on old processors */
 
-       if (cpu_has_hypervisor)
+       if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
                return hypervisor_cpuid_base("KVMKVMKVM\0\0\0", 0);
 
        return 0;
index 5fbda7b218c7a9ed06b2050ca276443a17b319d9..9cf4f8463c4e6b141e69632cd67f2b24965c9757 100644 (file)
@@ -2425,7 +2425,7 @@ static __init uint32_t visorutil_spar_detect(void)
 {
        unsigned int eax, ebx, ecx, edx;
 
-       if (cpu_has_hypervisor) {
+       if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) {
                /* check the ID */
                cpuid(UNISYS_SPAR_LEAF_ID, &eax, &ebx, &ecx, &edx);
                return  (ebx == UNISYS_SPAR_ID_EBX) &&