x86/msr: Shorten ARCH_CAPABILITIES_* constants
PATCH 1/1 x86/msr: Shorten ARCH_CAPABILITIES_* constants
They are unnecesserily verbose, and ARCH_CAPS_* is already the more common version.
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
--- xen/arch/x86/spec_ctrl.c | 10 +++++----- xen/include/asm-x86/msr-index.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-)
xen/arch/x86/spec_ctrl.c +5 -5
@@ -230,8 +230,8 @@ static void __init print_details(enum ind_thunk thunk, uint64_t caps) (_7d0 &cpufeat_mask (X86_FEATURE_L1D_FLUSH )) ?" L1D_FLUSH" :"" , (_7d0 &cpufeat_mask (X86_FEATURE_SSBD )) ?" SSBD" :"" , (e8b &cpufeat_mask (X86_FEATURE_IBPB )) ?" IBPB" :"" , - (caps &ARCH_CAPABILITIES_IBRS_ALL ) ?" IBRS_ALL" :"" , - (caps &ARCH_CAPABILITIES_RDCL_NO ) ?" RDCL_NO" :"" , + (caps &ARCH_CAPS_IBRS_ALL ) ?" IBRS_ALL" :"" , + (caps &ARCH_CAPS_RDCL_NO ) ?" RDCL_NO" :"" , (caps &ARCH_CAPS_RSBA ) ?" RSBA" :"" , (caps &ARCH_CAPS_SKIP_L1DFL ) ?" SKIP_L1DFL" :"" , (caps & ARCH_CAPS_SSB_NO) ? " SSB_NO" : "");
@@ -549,7 +549,7 @@ static __init void l1tf_calculations(uint64_t caps) }/* Any processor advertising RDCL_NO should be not vulnerable to L1TF. */ -if ( caps &ARCH_CAPABILITIES_RDCL_NO ) +if ( caps &ARCH_CAPS_RDCL_NO ) cpu_has_bug_l1tf = false;if ( cpu_has_bug_l1tf && hit_default )
@@ -613,9 +613,9 @@ int8_t __read_mostly opt_xpti_domu = -1;static __init void xpti_init_default (uint64_t caps) {if ( boot_cpu_data.x86_vendor ==X86_VENDOR_AMD ) - caps =ARCH_CAPABILITIES_RDCL_NO ; + caps =ARCH_CAPS_RDCL_NO ; -if ( caps &ARCH_CAPABILITIES_RDCL_NO ) +if ( caps &ARCH_CAPS_RDCL_NO ) {if ( opt_xpti_hwdom <0 ) opt_xpti_hwdom =0 ;
xen/include/asm-x86/msr-index.h +2 -2
@@ -42,8 +42,8 @@#define PRED_CMD_IBPB (_AC(1, ULL) << 0)#define MSR_ARCH_CAPABILITIES 0x0000010a -#define ARCH_CAPABILITIES_RDCL_NO (_AC(1, ULL) << 0) -#define ARCH_CAPABILITIES_IBRS_ALL (_AC(1, ULL) << 1) +#define ARCH_CAPS_RDCL_NO (_AC(1, ULL) << 0) +#define ARCH_CAPS_IBRS_ALL (_AC(1, ULL) << 1)#define ARCH_CAPS_RSBA (_AC(1, ULL) << 2)#define ARCH_CAPS_SKIP_L1DFL (_AC(1, ULL) << 3)#define ARCH_CAPS_SSB_NO (_AC(1, ULL) << 4)
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 18.03.19 at 12:45, <[email protected]> wrote:
They are unnecesserily verbose, and ARCH_CAPS_* is already the more common version.
Signed-off-by Andrew Cooper <[email protected]>
Acked-by Jan Beulich <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel