From: tip-bot for Borislav Petkov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
tglx@linutronix.de, bp@suse.de, hpa@zytor.com,
peterz@infradead.org, mingo@kernel.org,
david.kershner@unisys.com
Subject: [tip:x86/cpu] x86/cpufeature: Remove cpu_has_hypervisor
Date: Thu, 31 Mar 2016 06:01:36 -0700 [thread overview]
Message-ID: <tip-0c9f3536cc712dfd5ec3127d55cd7b807cc0adb5@git.kernel.org> (raw)
In-Reply-To: <1459266123-21878-3-git-send-email-bp@alien8.de>
Commit-ID: 0c9f3536cc712dfd5ec3127d55cd7b807cc0adb5
Gitweb: http://git.kernel.org/tip/0c9f3536cc712dfd5ec3127d55cd7b807cc0adb5
Author: Borislav Petkov <bp@suse.de>
AuthorDate: Tue, 29 Mar 2016 17:41:55 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 31 Mar 2016 13:35:07 +0200
x86/cpufeature: Remove cpu_has_hypervisor
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 | 2 +-
arch/x86/include/asm/cpufeature.h | 1 -
arch/x86/kernel/cpu/vmware.c | 2 +-
arch/x86/kernel/kvm.c | 2 +-
drivers/staging/unisys/visorbus/visorchipset.c | 2 +-
5 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 7012d18..3f6d8b5 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -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();
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index fee7a6e..3aea54e 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -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!
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 364e583..8cac429 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -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];
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 8079508..dc1207e 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -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;
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 5fbda7b..9cf4f84 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -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) &&
next prev parent reply other threads:[~2016-03-31 13:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 15:41 [PATCH 00/10] x86/cpu: Some more cpu_has_YYY removal Borislav Petkov
2016-03-29 15:41 ` [PATCH 01/10] x86/cpufeature: Kill cpu_has_arch_perfmon Borislav Petkov
2016-03-31 13:01 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_arch_perfmon tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 02/10] x86/cpufeature: Kill cpu_has_hypervisor Borislav Petkov
2016-03-29 18:03 ` Kershner, David A
2016-03-31 13:01 ` tip-bot for Borislav Petkov [this message]
2016-04-01 7:40 ` [tip:x86/cpu] x86/cpufeature: Fix build bug caused by merge artifact with the removal of cpu_has_hypervisor tip-bot for Ingo Molnar
2016-04-01 7:51 ` Borislav Petkov
2016-03-29 15:41 ` [PATCH 03/10] x86/cpufeature: Kill cpu_has_osxsave Borislav Petkov
2016-03-31 13:01 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_osxsave tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 04/10] x86/cpufeature: Kill cpu_has_x2apic Borislav Petkov
2016-03-29 16:16 ` Luck, Tony
2016-03-31 13:02 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_x2apic tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 05/10] x86/cpufeature: Kill cpu_has_gbpages Borislav Petkov
2016-03-31 13:02 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_gbpages tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 06/10] x86/cpufeature: Kill cpu_has_clflush Borislav Petkov
2016-03-31 13:03 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_clflush tip-bot for Borislav Petkov
2016-03-29 15:42 ` [PATCH 07/10] x86/cpufeature: Kill cpu_has_xmm2 Borislav Petkov
2016-03-31 13:03 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_xmm2 tip-bot for Borislav Petkov
2016-03-29 15:42 ` [PATCH 08/10] x86/cpufeature: Kill cpu_has_pat Borislav Petkov
2016-03-30 11:28 ` [Intel-gfx] " Daniel Vetter
2016-03-31 13:00 ` [tip:x86/mm] x86/mm/pat, x86/cpufeature: Remove cpu_has_pat tip-bot for Borislav Petkov
2016-03-29 15:42 ` [PATCH 09/10] x86/cpufeature: Kill cpu_has_pge Borislav Petkov
2016-03-31 13:03 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_pge tip-bot for Borislav Petkov
2016-03-29 15:42 ` [PATCH 10/10] x86/cpufeature: Kill cpu_has_pse Borislav Petkov
2016-03-31 13:04 ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_pse tip-bot for Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-0c9f3536cc712dfd5ec3127d55cd7b807cc0adb5@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@suse.de \
--cc=david.kershner@unisys.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).