]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Alok Kataria <akataria@vmware.com> |
2 | Subject: x86: add X86_FEATURE_HYPERVISOR feature bit | |
3 | Patch-mainline: | |
4 | References: bnc#441338 | |
5 | ||
6 | Impact: Number declaration only. | |
7 | ||
8 | Add X86_FEATURE_HYPERVISOR bit (CPUID level 1, ECX, bit 31). | |
9 | ||
10 | Signed-off-by: H. Peter Anvin <hpa@zytor.com> | |
11 | Signed-off-by: Alok N Kataria <akataria@vmware.com> | |
12 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
13 | --- | |
14 | ||
15 | include/asm-x86/cpufeature.h | 2 ++ | |
16 | 1 files changed, 2 insertions(+), 0 deletions(-) | |
17 | ||
18 | ||
19 | Index: linux-2.6.27.4-2-beta4/include/asm-x86/cpufeature.h | |
20 | =================================================================== | |
21 | --- linux-2.6.27.4-2-beta4.orig/include/asm-x86/cpufeature.h 2008-11-10 12:41:49.000000000 -0800 | |
22 | +++ linux-2.6.27.4-2-beta4/include/asm-x86/cpufeature.h 2008-11-10 12:43:12.000000000 -0800 | |
23 | @@ -97,6 +97,7 @@ | |
24 | #define X86_FEATURE_DCA (4*32+18) /* Direct Cache Access */ | |
25 | #define X86_FEATURE_XMM4_2 (4*32+20) /* Streaming SIMD Extensions-4.2 */ | |
26 | #define X86_FEATURE_X2APIC (4*32+21) /* x2APIC */ | |
27 | +#define X86_FEATURE_HYPERVISOR (4*32+31) /* Running on a hypervisor */ | |
28 | ||
29 | /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */ | |
30 | #define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */ | |
31 | @@ -197,6 +198,7 @@ | |
32 | #define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT) | |
33 | #define cpu_has_xmm4_2 boot_cpu_has(X86_FEATURE_XMM4_2) | |
34 | #define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC) | |
35 | +#define cpu_has_hypervisor boot_cpu_has(X86_FEATURE_HYPERVISOR) | |
36 | ||
37 | #if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64) | |
38 | # define cpu_has_invlpg 1 |