[PATCH v2 02/10] x86/snp: drop WBINVD before setting SNPEn

From: Tycho Andersen

Date: Mon Mar 09 2026 - 14:09:21 EST


From: "Tycho Andersen (AMD)" <tycho@xxxxxxxxxx>

WBINVD is required before SNP_INIT(_EX), but not before setting SNPEn,
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) <tycho@xxxxxxxxxx>
Reviewed-by: Tom Lendacky <thomas.lendacky@xxxxxxx>
---
arch/x86/virt/svm/sev.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/arch/x86/virt/svm/sev.c b/arch/x86/virt/svm/sev.c
index f404c609582c..5e07f103c271 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);

--
2.53.0