[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 02/10] x86/hvm: pkeys, add pku support for x86_capability
This patch adds pku support for x86_capability. Signed-off-by: Huaitong Han <huaitong.han@xxxxxxxxx> diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index 35ef21b..04bf4fb 100644 --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -211,7 +211,7 @@ static void __init early_cpu_detect(void) static void __cpuinit generic_identify(struct cpuinfo_x86 *c) { - u32 tfms, capability, excap, ebx; + u32 tfms, capability, excap, ebx, ecx; /* Get vendor name */ cpuid(0x00000000, &c->cpuid_level, @@ -258,8 +258,9 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 *c) /* Intel-defined flags: level 0x00000007 */ if ( c->cpuid_level >= 0x00000007 ) { u32 dummy; - cpuid_count(0x00000007, 0, &dummy, &ebx, &dummy, &dummy); + cpuid_count(0x00000007, 0, &dummy, &ebx, &ecx, &dummy); c->x86_capability[X86_FEATURE_FSGSBASE / 32] = ebx; + c->x86_capability[X86_FEATURE_PKU / 32] = ecx; } } diff --git a/xen/include/asm-x86/cpufeature.h b/xen/include/asm-x86/cpufeature.h index 3c3b95f..b2899e3 100644 --- a/xen/include/asm-x86/cpufeature.h +++ b/xen/include/asm-x86/cpufeature.h @@ -9,7 +9,7 @@ #define __ASM_I386_CPUFEATURE_H #endif -#define NCAPINTS 8 /* N 32-bit words worth of info */ +#define NCAPINTS 9 /* N 32-bit words worth of info */ /* Intel-defined CPU features, CPUID level 0x00000001 (edx), word 0 */ #define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ -- 2.4.3 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |