[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/Intel: Expose cpuid_faulting_enabled so it can be used elsewhere
commit 70c95ecd5c0ec2fc5cf2bb0c5f96814bbd10c5b3 Author: Kyle Huey <me@xxxxxxxxxxxx> AuthorDate: Thu Oct 20 06:44:27 2016 -0700 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Oct 20 15:27:55 2016 +0100 x86/Intel: Expose cpuid_faulting_enabled so it can be used elsewhere While we're here, use bool instead of bool_t. Signed-off-by: Kyle Huey <khuey@xxxxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/arch/x86/cpu/intel.c | 9 +++++---- xen/include/asm-x86/cpuid.h | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c index 7b60aaa..2e11662 100644 --- a/xen/arch/x86/cpu/intel.c +++ b/xen/arch/x86/cpu/intel.c @@ -18,7 +18,7 @@ #define select_idle_routine(x) ((void)0) -static bool_t __init probe_intel_cpuid_faulting(void) +static bool __init probe_intel_cpuid_faulting(void) { uint64_t x; @@ -32,10 +32,11 @@ static bool_t __init probe_intel_cpuid_faulting(void) return 1; } -static void set_cpuid_faulting(bool_t enable) +DEFINE_PER_CPU(bool, cpuid_faulting_enabled); + +static void set_cpuid_faulting(bool enable) { - static DEFINE_PER_CPU(bool_t, cpuid_faulting_enabled); - bool_t *this_enabled = &this_cpu(cpuid_faulting_enabled); + bool *this_enabled = &this_cpu(cpuid_faulting_enabled); uint32_t hi, lo; ASSERT(cpu_has_cpuid_faulting); diff --git a/xen/include/asm-x86/cpuid.h b/xen/include/asm-x86/cpuid.h index 8e3f639..2372474 100644 --- a/xen/include/asm-x86/cpuid.h +++ b/xen/include/asm-x86/cpuid.h @@ -64,6 +64,9 @@ DECLARE_PER_CPU(struct cpuidmasks, cpuidmasks); /* Default masking MSR values, calculated at boot. */ extern struct cpuidmasks cpuidmask_defaults; +/* Whether or not cpuid faulting is available for the current domain. */ +DECLARE_PER_CPU(bool, cpuid_faulting_enabled); + #endif /* __ASSEMBLY__ */ #endif /* !__X86_CPUID_H__ */ -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |