>>> On 04.01.18 at 01:15, <andrew.coop...@citrix.com> wrote: > --- a/xen/arch/x86/spec_ctrl.c > +++ b/xen/arch/x86/spec_ctrl.c > @@ -32,7 +32,7 @@ enum ind_thunk { > THUNK_LFENCE, > THUNK_JMP, > } opt_thunk __initdata = THUNK_DEFAULT; > -int opt_ibrs __initdata = -1; > +int opt_ibrs __initdata = -1, opt_ibpb __initdata = -1;
static, but see below. > --- a/xen/include/asm-x86/cpufeature.h > +++ b/xen/include/asm-x86/cpufeature.h > @@ -109,6 +109,7 @@ > #define cpu_has_aperfmperf boot_cpu_has(X86_FEATURE_APERFMPERF) > #define cpu_has_xen_smep boot_cpu_has(X86_FEATURE_XEN_SMEP) > #define cpu_has_lfence_dispatch boot_cpu_has(X86_FEATURE_LFENCE_DISPATCH) > +#define cpu_has_xen_ibpb boot_cpu_has(X86_FEATURE_XEN_IBPB) Upon second look I'm actually not convinced using a CPU feature flag here is warranted: You don't key any patching off of it, so simply making opt_ibpb global (and non-init) should suffice. I do realize that this would mean a change to an earlier patch. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel