Commit e3fd08af authored by Ashish Kalra's avatar Ashish Kalra Committed by Borislav Petkov (AMD)

x86/mtrr: Don't print errors if MtrrFixDramModEn is set when SNP enabled

SNP enabled platforms require the MtrrFixDramModeEn bit to be set across
all CPUs when SNP is enabled. Therefore, don't print error messages when
MtrrFixDramModeEn is set when bringing CPUs online.

Closes: https://lore.kernel.org/kvm/68b2d6bf-bce7-47f9-bebb-2652cc923ff9@linux.microsoft.com/Reported-by: default avatarJeremi Piotrowski <jpiotrowski@linux.microsoft.com>
Signed-off-by: default avatarAshish Kalra <ashish.kalra@amd.com>
Signed-off-by: default avatarMichael Roth <michael.roth@amd.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20240126041126.1927228-6-michael.roth@amd.com
parent 216d106c
...@@ -108,6 +108,9 @@ static inline void k8_check_syscfg_dram_mod_en(void) ...@@ -108,6 +108,9 @@ static inline void k8_check_syscfg_dram_mod_en(void)
(boot_cpu_data.x86 >= 0x0f))) (boot_cpu_data.x86 >= 0x0f)))
return; return;
if (cpu_feature_enabled(X86_FEATURE_SEV_SNP))
return;
rdmsr(MSR_AMD64_SYSCFG, lo, hi); rdmsr(MSR_AMD64_SYSCFG, lo, hi);
if (lo & K8_MTRRFIXRANGE_DRAM_MODIFY) { if (lo & K8_MTRRFIXRANGE_DRAM_MODIFY) {
pr_err(FW_WARN "MTRR: CPU %u: SYSCFG[MtrrFixDramModEn]" pr_err(FW_WARN "MTRR: CPU %u: SYSCFG[MtrrFixDramModEn]"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment