]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
x86/sev: Export startup routines for later use
authorArd Biesheuvel <ardb@kernel.org>
Thu, 28 Aug 2025 10:22:17 +0000 (12:22 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 3 Sep 2025 15:59:49 +0000 (17:59 +0200)
Create aliases that expose routines that are part of the startup code to
other code in the core kernel, so that they can be called later as well.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250828102202.1849035-38-ardb+git@google.com
arch/x86/boot/startup/exports.h [new file with mode: 0644]
arch/x86/kernel/vmlinux.lds.S

diff --git a/arch/x86/boot/startup/exports.h b/arch/x86/boot/startup/exports.h
new file mode 100644 (file)
index 0000000..01d2363
--- /dev/null
@@ -0,0 +1,14 @@
+
+/*
+ * The symbols below are functions that are implemented by the startup code,
+ * but called at runtime by the SEV code residing in the core kernel.
+ */
+PROVIDE(early_set_pages_state          = __pi_early_set_pages_state);
+PROVIDE(early_snp_set_memory_private   = __pi_early_snp_set_memory_private);
+PROVIDE(early_snp_set_memory_shared    = __pi_early_snp_set_memory_shared);
+PROVIDE(get_hv_features                        = __pi_get_hv_features);
+PROVIDE(sev_es_terminate               = __pi_sev_es_terminate);
+PROVIDE(snp_cpuid                      = __pi_snp_cpuid);
+PROVIDE(snp_cpuid_get_table            = __pi_snp_cpuid_get_table);
+PROVIDE(svsm_issue_call                        = __pi_svsm_issue_call);
+PROVIDE(svsm_process_result_codes      = __pi_svsm_process_result_codes);
index 4fa0be732af10fa7143cad037f38d90405e84ff4..5d5e3a95e1f9bf4f51d5191c475fc98639b7725b 100644 (file)
@@ -535,3 +535,5 @@ xen_elfnote_entry_value =
 xen_elfnote_phys32_entry_value =
        ABSOLUTE(xen_elfnote_phys32_entry) + ABSOLUTE(pvh_start_xen - LOAD_OFFSET);
 #endif
+
+#include "../boot/startup/exports.h"