mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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@kylehuey.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> Release-acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
8b4664265b
commit
70c95ecd5c
2 files changed
+8
-4
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
|
||||