Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/sev: Zap snp_abort()

It is a silly oneliner anyway. Replace it with its equivalent.

No functional changes.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>

+2 -10
+1 -6
arch/x86/boot/startup/sev-startup.c
··· 144 144 145 145 found_cc_info: 146 146 if (cc_info->magic != CC_BLOB_SEV_HDR_MAGIC) 147 - snp_abort(); 147 + sev_es_terminate(SEV_TERM_SET_GEN, GHCB_SNP_UNSUPPORTED); 148 148 149 149 return cc_info; 150 150 } ··· 217 217 bp->cc_blob_address = (u32)(unsigned long)cc_info; 218 218 219 219 return true; 220 - } 221 - 222 - void __init __noreturn snp_abort(void) 223 - { 224 - sev_es_terminate(SEV_TERM_SET_GEN, GHCB_SNP_UNSUPPORTED); 225 220 }
+1 -1
arch/x86/boot/startup/sme.c
··· 532 532 * enablement abort the guest. 533 533 */ 534 534 if (snp_en ^ !!(msr & MSR_AMD64_SEV_SNP_ENABLED)) 535 - snp_abort(); 535 + sev_es_terminate(SEV_TERM_SET_GEN, GHCB_SNP_UNSUPPORTED); 536 536 537 537 /* Check if memory encryption is enabled */ 538 538 if (feature_mask == AMD_SME_BIT) {
-2
arch/x86/include/asm/sev.h
··· 512 512 void snp_set_memory_private(unsigned long vaddr, unsigned long npages); 513 513 void snp_set_wakeup_secondary_cpu(void); 514 514 bool snp_init(struct boot_params *bp); 515 - void __noreturn snp_abort(void); 516 515 void snp_dmi_setup(void); 517 516 int snp_issue_svsm_attest_req(u64 call_id, struct svsm_call *call, struct svsm_attest_call *input); 518 517 void snp_accept_memory(phys_addr_t start, phys_addr_t end); ··· 596 597 static inline void snp_set_memory_private(unsigned long vaddr, unsigned long npages) { } 597 598 static inline void snp_set_wakeup_secondary_cpu(void) { } 598 599 static inline bool snp_init(struct boot_params *bp) { return false; } 599 - static inline void snp_abort(void) { } 600 600 static inline void snp_dmi_setup(void) { } 601 601 static inline int snp_issue_svsm_attest_req(u64 call_id, struct svsm_call *call, struct svsm_attest_call *input) 602 602 {
-1
tools/objtool/noreturns.h
··· 45 45 NORETURN(rust_begin_unwind) 46 46 NORETURN(rust_helper_BUG) 47 47 NORETURN(sev_es_terminate) 48 - NORETURN(snp_abort) 49 48 NORETURN(start_kernel) 50 49 NORETURN(stop_this_cpu) 51 50 NORETURN(usercopy_abort)