File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Documentation/admin-guide Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 3079
3079
no5lvl [X86-64] Disable 5-level paging mode. Forces
3080
3080
kernel to use 4-level paging instead.
3081
3081
3082
+ unsafe_fsgsbase [X86] Allow FSGSBASE instructions. This will be
3083
+ replaced with a nofsgsbase flag.
3084
+
3082
3085
no_console_suspend
3083
3086
[HW] Never suspend the console
3084
3087
Disable suspending of consoles during suspend and
Original file line number Diff line number Diff line change @@ -441,6 +441,22 @@ static void __init setup_cr_pinning(void)
441
441
static_key_enable (& cr_pinning .key );
442
442
}
443
443
444
+ /*
445
+ * Temporary hack: FSGSBASE is unsafe until a few kernel code paths are
446
+ * updated. This allows us to get the kernel ready incrementally.
447
+ *
448
+ * Once all the pieces are in place, these will go away and be replaced with
449
+ * a nofsgsbase chicken flag.
450
+ */
451
+ static bool unsafe_fsgsbase ;
452
+
453
+ static __init int setup_unsafe_fsgsbase (char * arg )
454
+ {
455
+ unsafe_fsgsbase = true;
456
+ return 1 ;
457
+ }
458
+ __setup ("unsafe_fsgsbase" , setup_unsafe_fsgsbase );
459
+
444
460
/*
445
461
* Protection Keys are not available in 32-bit mode.
446
462
*/
@@ -1495,6 +1511,14 @@ static void identify_cpu(struct cpuinfo_x86 *c)
1495
1511
setup_smap (c );
1496
1512
setup_umip (c );
1497
1513
1514
+ /* Enable FSGSBASE instructions if available. */
1515
+ if (cpu_has (c , X86_FEATURE_FSGSBASE )) {
1516
+ if (unsafe_fsgsbase )
1517
+ cr4_set_bits (X86_CR4_FSGSBASE );
1518
+ else
1519
+ clear_cpu_cap (c , X86_FEATURE_FSGSBASE );
1520
+ }
1521
+
1498
1522
/*
1499
1523
* The vendor-specific functions might have changed features.
1500
1524
* Now we do "generic changes."
You can’t perform that action at this time.
0 commit comments