summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/hypervisor.h
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2010-12-21 14:18:48 +0800
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-01-07 10:03:49 -0500
commit2904ed8dd5a748c52caf4d8b09d3d9834b5932fa (patch)
tree93ebbdf8f44fd43519514b348d5e447113628351 /arch/x86/include/asm/hypervisor.h
parentcf7d7e5a1980d1116ee152d25dac382b112b9c17 (diff)
downloadblackbird-op-linux-2904ed8dd5a748c52caf4d8b09d3d9834b5932fa.tar.gz
blackbird-op-linux-2904ed8dd5a748c52caf4d8b09d3d9834b5932fa.zip
apic: Move hypervisor detection of x2apic to hypervisor.h
Then we can reuse it for Xen later. Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Acked-by: Avi Kivity <avi@redhat.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/include/asm/hypervisor.h')
-rw-r--r--arch/x86/include/asm/hypervisor.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/hypervisor.h b/arch/x86/include/asm/hypervisor.h
index ff2546ce7178..0c6f7af7fda8 100644
--- a/arch/x86/include/asm/hypervisor.h
+++ b/arch/x86/include/asm/hypervisor.h
@@ -20,6 +20,8 @@
#ifndef _ASM_X86_HYPERVISOR_H
#define _ASM_X86_HYPERVISOR_H
+#include <asm/kvm_para.h>
+
extern void init_hypervisor(struct cpuinfo_x86 *c);
extern void init_hypervisor_platform(void);
@@ -47,4 +49,11 @@ extern const struct hypervisor_x86 x86_hyper_vmware;
extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
extern const struct hypervisor_x86 x86_hyper_xen_hvm;
+static inline bool hypervisor_x2apic_available(void)
+{
+ if (kvm_para_available())
+ return true;
+ return false;
+}
+
#endif
OpenPOWER on IntegriCloud