Skip to content

Commit a2ab255

Browse files
akaherIngo Molnar
authored andcommitted
x86/vmware: Parse MP tables for SEV-SNP enabled guests under VMware hypervisors
Under VMware hypervisors, SEV-SNP enabled VMs are fundamentally able to boot without UEFI, but this regressed a year ago due to: 0f4a1e8 ("x86/sev: Skip ROM range scans and validation for SEV-SNP guests") In this case, mpparse_find_mptable() has to be called to parse MP tables which contains the necessary boot information. [ mingo: Updated the changelog. ] Fixes: 0f4a1e8 ("x86/sev: Skip ROM range scans and validation for SEV-SNP guests") Co-developed-by: Ye Li <[email protected]> Signed-off-by: Ye Li <[email protected]> Signed-off-by: Ajay Kaher <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Tested-by: Ye Li <[email protected]> Reviewed-by: Kevin Loughlin <[email protected]> Acked-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b7f94fc commit a2ab255

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/x86/kernel/cpu/vmware.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/export.h>
2727
#include <linux/clocksource.h>
2828
#include <linux/cpu.h>
29+
#include <linux/efi.h>
2930
#include <linux/reboot.h>
3031
#include <linux/static_call.h>
3132
#include <asm/div64.h>
@@ -429,6 +430,9 @@ static void __init vmware_platform_setup(void)
429430
pr_warn("Failed to get TSC freq from the hypervisor\n");
430431
}
431432

433+
if (cc_platform_has(CC_ATTR_GUEST_SEV_SNP) && !efi_enabled(EFI_BOOT))
434+
x86_init.mpparse.find_mptable = mpparse_find_mptable;
435+
432436
vmware_paravirt_ops_setup();
433437

434438
#ifdef CONFIG_X86_IO_APIC

0 commit comments

Comments
 (0)