mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86/spec-ctrl: Rename opt_ibpb to opt_ibpb_ctxt_switch
We are about to introduce the use of IBPB at different points in Xen, making
opt_ibpb ambiguous. Rename it to opt_ibpb_ctxt_switch.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit a8e5ef079d)
This commit is contained in:
1 parent
ba33672923
commit
fbf19baaaf
3 files changed
+7
-7
No files matched your search
@@ -1792,7 +1792,7 @@ void context_switch(struct vcpu *prev, struct vcpu *next)
|
||||
|
||||
ctxt_switch_levelling(next);
|
||||
|
||||
if ( opt_ibpb && !is_idle_domain(nextd) )
|
||||
if ( opt_ibpb_ctxt_switch && !is_idle_domain(nextd) )
|
||||
{
|
||||
static DEFINE_PER_CPU(unsigned int, last);
|
||||
unsigned int *last_id = &this_cpu(last);
|
||||
|
||||
@@ -54,7 +54,7 @@ int8_t __initdata opt_stibp = -1;
|
||||
bool __read_mostly opt_ssbd;
|
||||
int8_t __initdata opt_psfd = -1;
|
||||
|
||||
bool __read_mostly opt_ibpb = true;
|
||||
bool __read_mostly opt_ibpb_ctxt_switch = true;
|
||||
int8_t __read_mostly opt_eager_fpu = -1;
|
||||
int8_t __read_mostly opt_l1d_flush = -1;
|
||||
bool __read_mostly opt_branch_harden = true;
|
||||
@@ -118,7 +118,7 @@ static int __init parse_spec_ctrl(const char *s)
|
||||
|
||||
opt_thunk = THUNK_JMP;
|
||||
opt_ibrs = 0;
|
||||
opt_ibpb = false;
|
||||
opt_ibpb_ctxt_switch = false;
|
||||
opt_ssbd = false;
|
||||
opt_l1d_flush = 0;
|
||||
opt_branch_harden = false;
|
||||
@@ -239,7 +239,7 @@ static int __init parse_spec_ctrl(const char *s)
|
||||
|
||||
/* Misc settings. */
|
||||
else if ( (val = parse_boolean("ibpb", s, ss)) >= 0 )
|
||||
opt_ibpb = val;
|
||||
opt_ibpb_ctxt_switch = val;
|
||||
else if ( (val = parse_boolean("eager-fpu", s, ss)) >= 0 )
|
||||
opt_eager_fpu = val;
|
||||
else if ( (val = parse_boolean("l1d-flush", s, ss)) >= 0 )
|
||||
@@ -455,7 +455,7 @@ static void __init print_details(enum ind_thunk thunk, uint64_t caps)
|
||||
(opt_tsx & 1) ? " TSX+" : " TSX-",
|
||||
!boot_cpu_has(X86_FEATURE_SRBDS_CTRL) ? "" :
|
||||
opt_srb_lock ? " SRB_LOCK+" : " SRB_LOCK-",
|
||||
opt_ibpb ? " IBPB" : "",
|
||||
opt_ibpb_ctxt_switch ? " IBPB-ctxt" : "",
|
||||
opt_l1d_flush ? " L1D_FLUSH" : "",
|
||||
opt_md_clear_pv || opt_md_clear_hvm ||
|
||||
opt_fb_clear_mmio ? " VERW" : "",
|
||||
@@ -1170,7 +1170,7 @@ void __init init_speculation_mitigations(void)
|
||||
|
||||
/* Check we have hardware IBPB support before using it... */
|
||||
if ( !boot_cpu_has(X86_FEATURE_IBRSB) && !boot_cpu_has(X86_FEATURE_IBPB) )
|
||||
opt_ibpb = false;
|
||||
opt_ibpb_ctxt_switch = false;
|
||||
|
||||
/* Check whether Eager FPU should be enabled by default. */
|
||||
if ( opt_eager_fpu == -1 )
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
void init_speculation_mitigations(void);
|
||||
void spec_ctrl_init_domain(struct domain *d);
|
||||
|
||||
extern bool opt_ibpb;
|
||||
extern bool opt_ibpb_ctxt_switch;
|
||||
extern bool opt_ssbd;
|
||||
extern int8_t opt_eager_fpu;
|
||||
extern int8_t opt_l1d_flush;
|
||||
|
||||