[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250313173111.10918-1-ajay.kaher@broadcom.com>
Date: Thu, 13 Mar 2025 17:31:11 +0000
From: Ajay Kaher <ajay.kaher@...adcom.com>
To: bp@...en8.de,
thomas.lendacky@....com
Cc: ajay.kaher@...adcom.com,
alexey.makhalov@...adcom.com,
bcm-kernel-feedback-list@...adcom.com,
bo.gan@...adcom.com,
dave.hansen@...ux.intel.com,
florian.fainelli@...adcom.com,
hpa@...or.com,
kevinloughlin@...gle.com,
linux-kernel@...r.kernel.org,
mingo@...hat.com,
tglx@...utronix.de,
vamsi-krishna.brahmajosyula@...adcom.com,
vasavi.sirnapalli@...adcom.com,
virtualization@...ts.linux.dev,
x86@...nel.org,
ye.li@...adcom.com
Subject: [PATCH v2] sev-snp: parse MP tables for VMware hypervisor
For VMware hypervisor, SEV-SNP enabled VM's could boot without UEFI.
In this case, mpparse_find_mptable() has to be called to parse MP
tables which contains boot information.
Fixes: 0f4a1e80989a ("x86/sev: Skip ROM range scans and validation for SEV-SNP guests")
Co-developed-by: Ye Li <ye.li@...adcom.com>
Signed-off-by: Ye Li <ye.li@...adcom.com>
Signed-off-by: Ajay Kaher <ajay.kaher@...adcom.com>
Tested-by: Ye Li <ye.li@...adcom.com>
Reviewed-by: Kevin Loughlin <kevinloughlin@...gle.com>
---
Changes since v1:
https://lore.kernel.org/lkml/20241219114400.858980-1-ajay.kaher@broadcom.com/
- use cc_platform_has(CC_ATTR_GUEST_SEV_SNP) instead of
(sev_status & MSR_AMD64_SEV_SNP_ENABLED)
- remove unwanted header files
---
arch/x86/kernel/cpu/vmware.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 00189cdeb..cb3f900c4 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -26,6 +26,7 @@
#include <linux/export.h>
#include <linux/clocksource.h>
#include <linux/cpu.h>
+#include <linux/efi.h>
#include <linux/reboot.h>
#include <linux/static_call.h>
#include <asm/div64.h>
@@ -429,6 +430,9 @@ static void __init vmware_platform_setup(void)
pr_warn("Failed to get TSC freq from the hypervisor\n");
}
+ if (cc_platform_has(CC_ATTR_GUEST_SEV_SNP) && !efi_enabled(EFI_BOOT))
+ x86_init.mpparse.find_mptable = mpparse_find_mptable;
+
vmware_paravirt_ops_setup();
#ifdef CONFIG_X86_IO_APIC
--
2.39.4
Powered by blists - more mailing lists