@@ -2081,7 +2081,6 @@ static __init void identify_boot_cpu(void)
enable_sep_cpu();
#endif
cpu_detect_tlb(&boot_cpu_data);
- setup_cr_pinning();
tsx_init();
tdx_init();
@@ -2532,10 +2531,14 @@ void __init arch_cpu_finalize_init(void)
/*
* This needs to follow the FPU initializtion, since EFI depends on it.
+ *
+ * EFI twiddles CR4.LASS. Do it before CR pinning.
*/
if (efi_enabled(EFI_RUNTIME_SERVICES))
efi_enter_virtual_mode();
+ setup_cr_pinning();
+
/*
* Ensure that access to the per CPU representation has the initial
* boot CPU configuration.