@@ -247,6 +247,37 @@ static const char * const mds_strings[] = {
247
247
[MDS_MITIGATION_VMWERV ] = "Vulnerable: Clear CPU buffers attempted, no microcode" ,
248
248
};
249
249
250
+ enum taa_mitigations {
251
+ TAA_MITIGATION_OFF ,
252
+ TAA_MITIGATION_UCODE_NEEDED ,
253
+ TAA_MITIGATION_VERW ,
254
+ TAA_MITIGATION_TSX_DISABLED ,
255
+ };
256
+
257
+ /* Default mitigation for TAA-affected CPUs */
258
+ static enum taa_mitigations taa_mitigation __ro_after_init =
259
+ IS_ENABLED (CONFIG_MITIGATION_TAA ) ? TAA_MITIGATION_VERW : TAA_MITIGATION_OFF ;
260
+
261
+ enum mmio_mitigations {
262
+ MMIO_MITIGATION_OFF ,
263
+ MMIO_MITIGATION_UCODE_NEEDED ,
264
+ MMIO_MITIGATION_VERW ,
265
+ };
266
+
267
+ /* Default mitigation for Processor MMIO Stale Data vulnerabilities */
268
+ static enum mmio_mitigations mmio_mitigation __ro_after_init =
269
+ IS_ENABLED (CONFIG_MITIGATION_MMIO_STALE_DATA ) ? MMIO_MITIGATION_VERW : MMIO_MITIGATION_OFF ;
270
+
271
+ enum rfds_mitigations {
272
+ RFDS_MITIGATION_OFF ,
273
+ RFDS_MITIGATION_VERW ,
274
+ RFDS_MITIGATION_UCODE_NEEDED ,
275
+ };
276
+
277
+ /* Default mitigation for Register File Data Sampling */
278
+ static enum rfds_mitigations rfds_mitigation __ro_after_init =
279
+ IS_ENABLED (CONFIG_MITIGATION_RFDS ) ? RFDS_MITIGATION_VERW : RFDS_MITIGATION_OFF ;
280
+
250
281
static void __init mds_select_mitigation (void )
251
282
{
252
283
if (!boot_cpu_has_bug (X86_BUG_MDS ) || cpu_mitigations_off ()) {
@@ -290,16 +321,6 @@ early_param("mds", mds_cmdline);
290
321
#undef pr_fmt
291
322
#define pr_fmt (fmt ) "TAA: " fmt
292
323
293
- enum taa_mitigations {
294
- TAA_MITIGATION_OFF ,
295
- TAA_MITIGATION_UCODE_NEEDED ,
296
- TAA_MITIGATION_VERW ,
297
- TAA_MITIGATION_TSX_DISABLED ,
298
- };
299
-
300
- /* Default mitigation for TAA-affected CPUs */
301
- static enum taa_mitigations taa_mitigation __ro_after_init =
302
- IS_ENABLED (CONFIG_MITIGATION_TAA ) ? TAA_MITIGATION_VERW : TAA_MITIGATION_OFF ;
303
324
static bool taa_nosmt __ro_after_init ;
304
325
305
326
static const char * const taa_strings [] = {
@@ -390,15 +411,6 @@ early_param("tsx_async_abort", tsx_async_abort_parse_cmdline);
390
411
#undef pr_fmt
391
412
#define pr_fmt (fmt ) "MMIO Stale Data: " fmt
392
413
393
- enum mmio_mitigations {
394
- MMIO_MITIGATION_OFF ,
395
- MMIO_MITIGATION_UCODE_NEEDED ,
396
- MMIO_MITIGATION_VERW ,
397
- };
398
-
399
- /* Default mitigation for Processor MMIO Stale Data vulnerabilities */
400
- static enum mmio_mitigations mmio_mitigation __ro_after_init =
401
- IS_ENABLED (CONFIG_MITIGATION_MMIO_STALE_DATA ) ? MMIO_MITIGATION_VERW : MMIO_MITIGATION_OFF ;
402
414
static bool mmio_nosmt __ro_after_init = false;
403
415
404
416
static const char * const mmio_strings [] = {
@@ -487,16 +499,6 @@ early_param("mmio_stale_data", mmio_stale_data_parse_cmdline);
487
499
#undef pr_fmt
488
500
#define pr_fmt (fmt ) "Register File Data Sampling: " fmt
489
501
490
- enum rfds_mitigations {
491
- RFDS_MITIGATION_OFF ,
492
- RFDS_MITIGATION_VERW ,
493
- RFDS_MITIGATION_UCODE_NEEDED ,
494
- };
495
-
496
- /* Default mitigation for Register File Data Sampling */
497
- static enum rfds_mitigations rfds_mitigation __ro_after_init =
498
- IS_ENABLED (CONFIG_MITIGATION_RFDS ) ? RFDS_MITIGATION_VERW : RFDS_MITIGATION_OFF ;
499
-
500
502
static const char * const rfds_strings [] = {
501
503
[RFDS_MITIGATION_OFF ] = "Vulnerable" ,
502
504
[RFDS_MITIGATION_VERW ] = "Mitigation: Clear Register File" ,
0 commit comments