mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Melody Wang <huibo.wang@amd.com>
To: <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Tom Lendacky <thomas.lendacky@amd.com>, <ardb@kernel.org>,
	Melody Wang <huibo.wang@amd.com>
Subject: [PATCH v3 5/8] x86/sev: Add a function to contain all SEV-specific setup operations
Date: Sun, 20 Sep 2026 18:16:57 +0000	[thread overview]
Message-ID: <8d0e7aaeb41a09bf30cabd1d6e36f43fdd0edc9c.1789927246.git.huibo.wang@amd.com> (raw)
In-Reply-To: <cover.1789927246.git.huibo.wang@amd.com>

To make the code clean in the boot phase, add a sev_prepare() wrapper
which contains early SEV-specific checks in order to have all that code
in a single place.

No functional changes.

Signed-off-by: Melody Wang <huibo.wang@amd.com>
---
 drivers/firmware/efi/libstub/x86-stub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index cef32e2c82d8..49388524a61f 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -783,7 +783,7 @@ static efi_status_t exit_boot(struct boot_params *boot_params, void *handle)
 	return EFI_SUCCESS;
 }
 
-static bool have_unsupported_snp_features(void)
+static bool sev_prepare(void)
 {
 	u64 unsupported;
 
@@ -933,7 +933,7 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
 
 	hdr = &boot_params->hdr;
 
-	if (have_unsupported_snp_features())
+	if (sev_prepare())
 		efi_exit(handle, EFI_UNSUPPORTED);
 
 	if (IS_ENABLED(CONFIG_EFI_DXE_MEM_ATTRIBUTES)) {
-- 
2.43.0


  parent reply	other threads:[~2026-09-20 18:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-20 18:12 [PATCH v3 0/8] Alternate Injection: Secure Interrupt Delivery for SEV-SNP Guests - Guest Support Melody Wang
2026-09-20 18:12 ` [PATCH v3 1/8] x86/sev: Make SVSM calls preemption-safe Melody Wang
2026-09-20 18:16   ` Melody Wang
2026-09-20 18:12 ` [PATCH v3 2/8] x86/sev: Add support for Alternate Injection Melody Wang
2026-09-20 18:16   ` Melody Wang
2026-09-20 18:16 ` [PATCH v3 0/8] Alternate Injection: Secure Interrupt Delivery for SEV-SNP Guests - Guest Support Melody Wang
2026-09-20 18:16 ` [PATCH v3 3/8] x86/apic: Add an SVSM APIC driver Melody Wang
2026-09-22  1:31   ` Melody Wang
2026-09-23 20:31   ` Borislav Petkov
2026-09-20 18:16 ` [PATCH v3 4/8] x86/sev: Route unsupported APIC register accesses to the hypervisor APIC emulation Melody Wang
2026-09-20 18:16 ` Melody Wang [this message]
2026-09-20 18:16 ` [PATCH v3 6/8] x86/sev: Register the guest with the SVSM APIC protocol Melody Wang
2026-09-23 20:46   ` Melody Wang
2026-09-20 18:16 ` [PATCH v3 7/8] x86/sev: Allow the guest to configure interrupt vectors for the hypervisor Melody Wang
2026-09-23 20:46   ` Melody Wang
2026-09-20 18:17 ` [PATCH v3 8/8] x86/sev: Indicate that Alternate Injection is supported in the guest Melody Wang
2026-09-23 20:56 ` [PATCH v3 0/8] Alternate Injection: Secure Interrupt Delivery for SEV-SNP Guests - Guest Support Ard Biesheuvel
2026-09-24 18:34   ` Melody Wang
2026-09-24 19:06     ` Ard Biesheuvel
2026-09-25  4:47       ` Borislav Petkov
2026-09-25  5:44         ` Ard Biesheuvel
2026-09-25  5:47           ` Borislav Petkov

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=8d0e7aaeb41a09bf30cabd1d6e36f43fdd0edc9c.1789927246.git.huibo.wang@amd.com \
    --to=huibo.wang@amd.com \
    --cc=ardb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /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®