Skip to content

Commit a3e6907

Browse files
ardbiesheuvelbp3tk0v
authored andcommitted
x86/boot: Drop unused sev_enable() fallback
The misc.h header is not included by the EFI stub, which is the only C caller of sev_enable(). This means the fallback for cases where CONFIG_AMD_MEM_ENCRYPT is not set is never used, so it can be dropped. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://patch.msgid.link/20250909080631.2867579-6-ardb+git@google.com
1 parent b2c1dd6 commit a3e6907

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

  • arch/x86/boot/compressed

arch/x86/boot/compressed/misc.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,6 @@ bool insn_has_rep_prefix(struct insn *insn);
152152
void sev_insn_decode_init(void);
153153
bool early_setup_ghcb(void);
154154
#else
155-
static inline void sev_enable(struct boot_params *bp)
156-
{
157-
/*
158-
* bp->cc_blob_address should only be set by boot/compressed kernel.
159-
* Initialize it to 0 unconditionally (thus here in this stub too) to
160-
* ensure that uninitialized values from buggy bootloaders aren't
161-
* propagated.
162-
*/
163-
if (bp)
164-
bp->cc_blob_address = 0;
165-
}
166155
static inline void snp_check_features(void) { }
167156
static inline void sev_es_shutdown_ghcb(void) { }
168157
static inline bool sev_es_check_ghcb_fault(unsigned long address)

0 commit comments

Comments
 (0)