mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sev-snp: parse MP tables for VMware hypervisor
@ 2024-12-19 11:44 Ajay Kaher
  2024-12-26 15:56 ` Kevin Loughlin
  2025-03-10 10:26 ` Borislav Petkov
  0 siblings, 2 replies; 10+ messages in thread
From: Ajay Kaher @ 2024-12-19 11:44 UTC (permalink / raw)
  To: kevinloughlin, bp
  Cc: bcm-kernel-feedback-list, tglx, mingo, dave.hansen, x86, hpa,
	virtualization, linux-kernel, ajay.kaher, ye.li, bo.gan,
	vamsi-krishna.brahmajosyula, alexey.makhalov, vasavi.sirnapalli,
	florian.fainelli

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")
Signed-off-by: Ajay Kaher <ajay.kaher@broadcom.com>
Signed-off-by: Ye Li <ye.li@broadcom.com>
Tested-by: Ye Li <ye.li@broadcom.com>
---
 arch/x86/kernel/cpu/vmware.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 00189cd..3e2594d 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>
@@ -35,6 +36,8 @@
 #include <asm/apic.h>
 #include <asm/vmware.h>
 #include <asm/svm.h>
+#include <asm/mem_encrypt.h>
+#include <asm/efi.h>
 
 #undef pr_fmt
 #define pr_fmt(fmt)	"vmware: " fmt
@@ -429,6 +432,10 @@ static void __init vmware_platform_setup(void)
 		pr_warn("Failed to get TSC freq from the hypervisor\n");
 	}
 
+	if (sev_status & MSR_AMD64_SEV_SNP_ENABLED &&
+	    !efi_enabled(EFI_BOOT))
+		x86_init.mpparse.find_mptable = mpparse_find_mptable;
+
 	vmware_paravirt_ops_setup();
 
 #ifdef CONFIG_X86_IO_APIC
-- 
2.39.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-03-12 11:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-19 11:44 [PATCH] sev-snp: parse MP tables for VMware hypervisor Ajay Kaher
2024-12-26 15:56 ` Kevin Loughlin
2025-01-03  4:31   ` Ajay Kaher
2025-01-17 16:35     ` Ajay Kaher
2025-01-17 22:56     ` Kevin Loughlin
2025-03-09  7:35       ` Ajay Kaher
2025-03-10 10:26 ` Borislav Petkov
2025-03-10 13:12   ` Tom Lendacky
2025-03-10 14:01     ` Borislav Petkov
2025-03-12 11:27     ` Ajay Kaher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®