From: Tycho Andersen (AMD) Date: Mon, 9 Mar 2026 18:00:44 +0000 (-0600) Subject: x86/virt/sev: Drop WBINVD before setting MSR_AMD64_SYSCFG_SNP_EN X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99cf1fb58e68291d408b4c4484181cf88f081857;p=thirdparty%2Flinux.git x86/virt/sev: Drop WBINVD before setting MSR_AMD64_SYSCFG_SNP_EN WBINVD is required before SNP_INIT(_EX), but not before setting MSR_AMD64_SYSCFG_SNP_EN, since the ccp driver already does its own WBINVD before SNP_INIT (and this one would be too early for that anyway...). Signed-off-by: Tycho Andersen (AMD) Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Link: https://patch.msgid.link/20260309180053.2389118-3-tycho@kernel.org --- diff --git a/arch/x86/virt/svm/sev.c b/arch/x86/virt/svm/sev.c index f404c609582c8..5e07f103c2711 100644 --- a/arch/x86/virt/svm/sev.c +++ b/arch/x86/virt/svm/sev.c @@ -524,9 +524,6 @@ int __init snp_rmptable_init(void) memset(desc->rmp_entry, 0, desc->size); } - /* Flush the caches to ensure that data is written before SNP is enabled. */ - wbinvd_on_all_cpus(); - /* MtrrFixDramModEn must be enabled on all the CPUs prior to enabling SNP. */ on_each_cpu(mfd_enable, NULL, 1);