Files
linux/arch/x86/include/asm
Tom Lendacky 7f830e126d x86/sev: Guard sev_evict_cache() with CONFIG_AMD_MEM_ENCRYPT
The sev_evict_cache() is guest-related code and should be guarded by
CONFIG_AMD_MEM_ENCRYPT, not CONFIG_KVM_AMD_SEV.

CONFIG_AMD_MEM_ENCRYPT=y is required for a guest to run properly as an SEV-SNP
guest, but a guest kernel built with CONFIG_KVM_AMD_SEV=n would get the stub
function of sev_evict_cache() instead of the version that performs the actual
eviction. Move the function declarations under the appropriate #ifdef.

Fixes: 7b306dfa32 ("x86/sev: Evict cache lines during SNP memory validation")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: stable@kernel.org # 6.16.x
Link: https://lore.kernel.org/r/70e38f2c4a549063de54052c9f64929705313526.1757708959.git.thomas.lendacky@amd.com
2025-09-15 18:29:43 +02:00
..
2025-05-31 09:40:40 +02:00
2025-07-10 09:44:44 -07:00
2023-11-21 17:23:35 +01:00
2020-05-07 16:06:20 +02:00
2025-01-14 08:35:08 +01:00
2024-11-25 12:11:55 -08:00
2021-10-28 23:25:26 +02:00
2025-03-17 22:06:53 -07:00
2025-01-13 23:07:18 +01:00
2025-08-04 23:34:03 +02:00
2020-11-06 23:14:58 +01:00
2022-04-07 08:27:52 -07:00
2022-11-10 13:12:45 +01:00
2025-03-17 22:06:53 -07:00
2025-04-16 15:36:23 +08:00
2025-02-14 10:32:05 +01:00
2024-10-02 16:53:38 +02:00
2025-02-18 11:08:36 +01:00
2022-01-30 21:17:00 -05:00
2022-01-30 21:17:00 -05:00
2024-06-25 17:15:48 +02:00
2025-04-07 07:36:33 -04:00