From: Ajay Kaher <ajay.kaher@broadcom.com>
To: kevinloughlin@google.com, bp@alien8.de
Cc: bcm-kernel-feedback-list@broadcom.com, tglx@linutronix.de,
mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org,
hpa@zytor.com, virtualization@lists.linux.dev,
linux-kernel@vger.kernel.org, ajay.kaher@broadcom.com,
ye.li@broadcom.com, bo.gan@broadcom.com,
vamsi-krishna.brahmajosyula@broadcom.com,
alexey.makhalov@broadcom.com, vasavi.sirnapalli@broadcom.com,
florian.fainelli@broadcom.com
Subject: [PATCH] sev-snp: parse MP tables for VMware hypervisor
Date: Thu, 19 Dec 2024 11:44:00 +0000 [thread overview]
Message-ID: <20241219114400.858980-1-ajay.kaher@broadcom.com> (raw)
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
next reply other threads:[~2024-12-19 11:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 11:44 Ajay Kaher [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241219114400.858980-1-ajay.kaher@broadcom.com \
--to=ajay.kaher@broadcom.com \
--cc=alexey.makhalov@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bo.gan@broadcom.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=florian.fainelli@broadcom.com \
--cc=hpa@zytor.com \
--cc=kevinloughlin@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=vamsi-krishna.brahmajosyula@broadcom.com \
--cc=vasavi.sirnapalli@broadcom.com \
--cc=virtualization@lists.linux.dev \
--cc=x86@kernel.org \
--cc=ye.li@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®