]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/sev: Make sev_snp_enabled() a static function
authorArd Biesheuvel <ardb@kernel.org>
Sun, 4 May 2025 09:52:34 +0000 (11:52 +0200)
committerIngo Molnar <mingo@kernel.org>
Sun, 4 May 2025 13:53:06 +0000 (15:53 +0200)
sev_snp_enabled() is no longer used outside of the source file that
defines it, so make it static and drop the extern declarations.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Dionna Amalie Glaze <dionnaglaze@google.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Kevin Loughlin <kevinloughlin@google.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: linux-efi@vger.kernel.org
Link: https://lore.kernel.org/r/20250504095230.2932860-29-ardb+git@google.com
arch/x86/boot/compressed/sev.c
arch/x86/boot/compressed/sev.h

index 2ccad0a35e2dac9b2eac15a8cd9b87d311c3a939..f4b7f1784bea41d20cd7e7282571c0bb02d09078 100644 (file)
@@ -164,7 +164,7 @@ int svsm_perform_call_protocol(struct svsm_call *call)
        return ret;
 }
 
-bool sev_snp_enabled(void)
+static bool sev_snp_enabled(void)
 {
        return sev_status & MSR_AMD64_SEV_SNP_ENABLED;
 }
index d3900384b8abb570f6caf9687f8a40415f59f667..e87af54fab2f51aab5a7c13e186d27828c51ce7f 100644 (file)
 
 #ifdef CONFIG_AMD_MEM_ENCRYPT
 
-bool sev_snp_enabled(void);
 void snp_accept_memory(phys_addr_t start, phys_addr_t end);
 u64 sev_get_status(void);
 bool early_is_sevsnp_guest(void);
 
 #else
 
-static inline bool sev_snp_enabled(void) { return false; }
 static inline void snp_accept_memory(phys_addr_t start, phys_addr_t end) { }
 static inline u64 sev_get_status(void) { return 0; }
 static inline bool early_is_sevsnp_guest(void) { return false; }