[PATCH 04/11] x86/snp: drop WBINVD before setting SNPEn

From: Tycho Andersen

Date: Mon Mar 02 2026 - 14:14:48 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>
---
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 e7fbbf1cdf8e..258e67ba7415 100644
--- a/arch/x86/virt/svm/sev.c
+++ b/arch/x86/virt/svm/sev.c
@@ -537,9 +537,6 @@ int __init snp_rmptable_init(void)

snp_clear_rmp();

- /* 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