summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorAshish Kalra <ashish.kalra@amd.com>2026-10-28 19:49:38 +0000
committerBorislav Petkov (AMD) <bp@alien8.de>2026-11-04 17:15:05 -0800
commitdc2334c1752b3c5f58af74f1e7ad6769b38e1f33 (patch)
treeff116b53e1cbd71ae8d26f7f3ca3913fb4b7c07d /scripts/Makefile.thinlto
parent2803a7993d4cd9354f851dfcab46991d676f4e6b (diff)
downloadlinux-next-dc2334c1752b3c5f58af74f1e7ad6769b38e1f33.tar.gz
linux-next-dc2334c1752b3c5f58af74f1e7ad6769b38e1f33.zip
x86/sev: Set up RMPOPT only on an active SNP host
rmpopt_init() setup work is gated only on X86_FEATURE_RMPOPT - a CPUID bit advertised independently of whether SNP is active. As a device_initcall it runs on every system with that bit, so on a host where SNP is not enabled (disabled in the BIOS, or AMD IOMMU initialization fails to bring it up) the workqueue is allocated and the message is printed at boot even though RMPOPT is never used: snp_enable_rmpopt() bails out on a non-SNP host. Rather than add an explicit SNP-host gate to the initcall, set RMPOPT up where the host SNP state is established. Call rmpopt_init() from the tail of snp_rmptable_init(), which runs only once the host RMP table has been set up and CC_ATTR_HOST_SEV_SNP is guaranteed, and drop the device_initcall. This is soft initialization only - the workqueue and the announcement; the actual RMPOPT_BASE programming is still done later by snp_enable_rmpopt(), which re-checks X86_FEATURE_RMPOPT, CC_ATTR_HOST_SEV_SNP and rmpopt_soft_init. An rmpopt_init() failure is non-fatal to SNP and is intentionally ignored by snp_rmptable_init(). [ bp: Massage commit message. ] Fixes: c6c6f156d192 ("x86/sev: Perform RMP optimizations asynchronously") Suggested-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Ashish Kalra <ashish.kalra@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://patch.msgid.link/331aeb2f29710865ec064bacf9edacaadde2b094.1793216372.git.ashish.kalra@amd.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions