Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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) <tycho@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://patch.msgid.link/20260309180053.2389118-3-tycho@kernel.org

authored by

Tycho Andersen (AMD) and committed by
Borislav Petkov (AMD)
99cf1fb5 959d3f75

-3
-3
arch/x86/virt/svm/sev.c
··· 524 524 memset(desc->rmp_entry, 0, desc->size); 525 525 } 526 526 527 - /* Flush the caches to ensure that data is written before SNP is enabled. */ 528 - wbinvd_on_all_cpus(); 529 - 530 527 /* MtrrFixDramModEn must be enabled on all the CPUs prior to enabling SNP. */ 531 528 on_each_cpu(mfd_enable, NULL, 1); 532 529