aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic
diff options
context:
space:
mode:
authorBorislav Petkov (AMD) <bp@alien8.de>2025-09-03 17:42:05 +0200
committerBorislav Petkov (AMD) <bp@alien8.de>2025-09-04 13:12:51 +0200
commitd4bc3b11c12b41fdb5650f5ad797de97f8dce869 (patch)
tree60d85b0a877c64f2b33cd3c34452291e7d4e5c76 /arch/x86/kernel/apic
parentx86/sev: Indicate the SEV-SNP guest supports Secure AVIC (diff)
downloadlinux-d4bc3b11c12b41fdb5650f5ad797de97f8dce869.tar.gz
linux-d4bc3b11c12b41fdb5650f5ad797de97f8dce869.zip
x86/apic/savic: Do not use snp_abort()
This function is going away so replace the callsites with the equivalent functionality. Add a new SAVIC-specific termination reason. If more granularity is needed there, it will be revisited in the future. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r--arch/x86/kernel/apic/x2apic_savic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic/x2apic_savic.c b/arch/x86/kernel/apic/x2apic_savic.c
index b846de0fbcfa..dbc5678bc3b6 100644
--- a/arch/x86/kernel/apic/x2apic_savic.c
+++ b/arch/x86/kernel/apic/x2apic_savic.c
@@ -363,7 +363,7 @@ static void savic_setup(void)
*/
res = savic_register_gpa(gpa);
if (res != ES_OK)
- snp_abort();
+ sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_SAVIC_FAIL);
native_wrmsrq(MSR_AMD64_SAVIC_CONTROL,
gpa | MSR_AMD64_SAVIC_EN | MSR_AMD64_SAVIC_ALLOWEDNMI);
@@ -376,13 +376,13 @@ static int savic_probe(void)
if (!x2apic_mode) {
pr_err("Secure AVIC enabled in non x2APIC mode\n");
- snp_abort();
+ sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_SAVIC_FAIL);
/* unreachable */
}
savic_page = alloc_percpu(struct secure_avic_page);
if (!savic_page)
- snp_abort();
+ sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_SAVIC_FAIL);
return 1;
}