x86/vtx: Remove opencoded MSR_ARCH_CAPS check

MSR_ARCH_CAPS data is now included in featureset information.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit 8f6bc7f9b7)
This commit is contained in:
Andrew Cooper committed 2023-08-03 19:13:40 +01:00
1 parent 541dfe378a
commit 290a645bfd
2 files changed
+5 -6

No files matched your search

+2 -6
View File
@@ -2640,8 +2640,6 @@ static void __init ler_to_fixup_check(void);
*/
static bool __init has_if_pschange_mc(void)
{
uint64_t caps = 0;
/*
* If we are virtualised, there is nothing we can do. Our EPT tables are
* shadowed by our hypervisor, and not walked by hardware.
@@ -2649,10 +2647,8 @@ static bool __init has_if_pschange_mc(void)
if ( cpu_has_hypervisor )
return false;
if ( cpu_has_arch_caps )
rdmsrl(MSR_ARCH_CAPABILITIES, caps);
if ( caps & ARCH_CAPS_IF_PSCHANGE_MC_NO )
/* Hardware reports itself as fixed. */
if ( cpu_has_if_pschange_mc_no )
return false;
/*
+3
View File
@@ -146,6 +146,9 @@
#define cpu_has_avx_vnni boot_cpu_has(X86_FEATURE_AVX_VNNI)
#define cpu_has_avx512_bf16 boot_cpu_has(X86_FEATURE_AVX512_BF16)
/* MSR_ARCH_CAPS */
#define cpu_has_if_pschange_mc_no boot_cpu_has(X86_FEATURE_IF_PSCHANGE_MC_NO)
/* Synthesized. */
#define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
#define cpu_has_cpuid_faulting boot_cpu_has(X86_FEATURE_CPUID_FAULTING)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.