enough. Setting this to a high value may cause boot failure, particularly if
the NMI watchdog is also enabled.
-### bti (x86)
-> `= List of [ <bool>, thunk=retpoline|lfence|jmp, ibrs=<bool>, ibpb=<bool>, rsb=<bool>, rsb_{vmexit,native}=<bool> ]`
-
-**WARNING: This command line option is deprecated, and superseded by
-_spec-ctrl=_ - using both options in combination is undefined.**
-
-Branch Target Injection controls. By default, Xen will pick the most
-appropriate BTI mitigations based on compiled in support, loaded microcode,
-and hardware details.
-
-**WARNING: Any use of this option may interfere with heuristics. Use with
-extreme care.**
-
-A (negative) boolean value can be specified to turn off all mitigations.
-(Use of a positive boolean value is invalid.)
-
-If Xen was compiled with INDIRECT\_THUNK support, `thunk=` can be used to
-select which of the thunks gets patched into the `__x86_indirect_thunk_%reg`
-locations. The default thunk is `retpoline` (generally preferred for Intel
-hardware), with the alternatives being `jmp` (a `jmp *%reg` gadget, minimal
-overhead), and `lfence` (an `lfence; jmp *%reg` gadget, preferred for AMD).
-
-On hardware supporting IBRS, the `ibrs=` option can be used to force or
-prevent Xen using the feature itself. If Xen is not using IBRS itself,
-functionality is still set up so IBRS can be virtualised for guests.
-
-On hardware supporting IBPB, the `ibpb=` option can be used to prevent Xen
-from issuing Branch Prediction Barriers on vcpu context switches.
-
-The `rsb=`, `rsb_vmexit=` and `rsb_native=` options can be used to control
-when the RSB gets overwritten. The former control all RSB overwriting, while
-the latter two can be used to fine tune overwriting on from HVM context, and
-an entry from a native (PV or Xen) context.
-
### clocksource (x86)
> `= pit | hpet | acpi | tsc`
static bool __initdata cpu_has_bug_l1tf;
static unsigned int __initdata l1d_maxphysaddr;
-static int __init parse_bti(const char *s)
-{
- const char *ss;
- int val, rc = 0;
-
- do {
- ss = strchr(s, ',');
- if ( !ss )
- ss = strchr(s, '\0');
-
- val = parse_bool(s, ss);
- if ( !val )
- {
- opt_thunk = THUNK_JMP;
- opt_ibrs = 0;
- opt_ibpb = false;
- opt_rsb_pv = false;
- opt_rsb_hvm = false;
- }
- else if ( val > 0 )
- rc = -EINVAL;
- else if ( !strncmp(s, "thunk=", 6) )
- {
- s += 6;
-
- if ( !strncmp(s, "retpoline", ss - s) )
- opt_thunk = THUNK_RETPOLINE;
- else if ( !strncmp(s, "lfence", ss - s) )
- opt_thunk = THUNK_LFENCE;
- else if ( !strncmp(s, "jmp", ss - s) )
- opt_thunk = THUNK_JMP;
- else
- rc = -EINVAL;
- }
- else if ( (val = parse_boolean("ibrs", s, ss)) >= 0 )
- opt_ibrs = val;
- else if ( (val = parse_boolean("ibpb", s, ss)) >= 0 )
- opt_ibpb = val;
- else if ( (val = parse_boolean("rsb_native", s, ss)) >= 0 )
- opt_rsb_pv = val;
- else if ( (val = parse_boolean("rsb_vmexit", s, ss)) >= 0 )
- opt_rsb_hvm = val;
- else if ( (val = parse_boolean("rsb", s, ss)) >= 0 )
- {
- opt_rsb_pv = val;
- opt_rsb_hvm = val;
- }
- else
- rc = -EINVAL;
-
- s = ss + 1;
- } while ( *ss );
-
- return rc;
-}
-custom_param("bti", parse_bti);
-
static int __init parse_spec_ctrl(const char *s)
{
const char *ss;