Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
xen.32200
xsa435-0-04.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xsa435-0-04.patch of Package xen.32200
From b672695e748869b2e2e2cb03f671f12003d2b079 Mon Sep 17 00:00:00 2001 From: Andrew Cooper <andrew.cooper3@citrix.com> Date: Fri, 11 Jun 2021 11:37:53 +0100 Subject: x86/msr: Expose MSR_ARCH_CAPS in the raw and host policies MSR_ARCH_CAPS is still not supported for guests yet (other than the hardware domain), until the toolstack learns how to construct an MSR policy. However, we want access to the host ARCH_CAPS_TSX_CTRL value in particular for testing purposes. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> --- a/xen/arch/x86/msr.c +++ b/xen/arch/x86/msr.c @@ -39,8 +39,13 @@ struct vcpu_msrs __read_mostly hvm_max_v static void __init calculate_raw_policy(void) { + struct msr_policy *mp = &raw_msr_policy; + /* 0x000000ce MSR_INTEL_PLATFORM_INFO */ /* Was already added by probe_cpuid_faulting() */ + + if ( cpu_has_arch_caps ) + rdmsrl(MSR_ARCH_CAPABILITIES, mp->arch_caps.raw); } static void __init calculate_host_policy(void) @@ -52,6 +57,12 @@ static void __init calculate_host_policy /* 0x000000ce MSR_INTEL_PLATFORM_INFO */ /* probe_cpuid_faulting() sanity checks presence of MISC_FEATURES_ENABLES */ mp->plaform_info.cpuid_faulting = cpu_has_cpuid_faulting; + + /* Temporary, until we have known_features[] for feature bits in MSRs. */ + mp->arch_caps.raw &= + (ARCH_CAPS_RDCL_NO | ARCH_CAPS_IBRS_ALL | ARCH_CAPS_RSBA | + ARCH_CAPS_SKIP_L1DFL | ARCH_CAPS_SSB_NO | ARCH_CAPS_MDS_NO | + ARCH_CAPS_IF_PSCHANGE_MC_NO | ARCH_CAPS_TSX_CTRL | ARCH_CAPS_TAA_NO); } static void __init calculate_hvm_max_policy(void) @@ -65,6 +76,8 @@ static void __init calculate_hvm_max_pol /* It's always possible to emulate CPUID faulting for HVM guests */ mp->plaform_info.cpuid_faulting = true; + + mp->arch_caps.raw = 0; /* Not supported yet. */ } static void __init calculate_pv_max_policy(void) @@ -72,6 +85,8 @@ static void __init calculate_pv_max_poli struct msr_policy *mp = &pv_max_msr_policy; *mp = host_msr_policy; + + mp->arch_caps.raw = 0; /* Not supported yet. */ } void __init init_guest_msr_policy(void) --- a/xen/include/asm-x86/cpufeature.h +++ b/xen/include/asm-x86/cpufeature.h @@ -119,6 +119,7 @@ /* CPUID level 0x00000007:0.edx */ #define cpu_has_tsx_force_abort boot_cpu_has(X86_FEATURE_TSX_FORCE_ABORT) +#define cpu_has_arch_caps boot_cpu_has(X86_FEATURE_ARCH_CAPS) /* Synthesized. */ #define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor