From c7772d5486c7657f57a8f4fd4d0a00cfdf74b0ee Mon Sep 17 00:00:00 2001 From: Liao Xuan Date: Thu, 13 Mar 2025 05:56:57 -0400 Subject: [PATCH] anolis: x86/amd_nb: Fix northbridge init warning in guest for Hygon family 18h model 4h ANBZ: #19122 When booting in guest on Hygon family 18h model 4h platform, there is warning as follows: "Hygon Fam18h Model4h northbridge init failed(-19)!" Avoid the northbridge init failure warning in guest since there is no northbridge. Fixes: ddc485f74738 ("anolis: x86/amd_nb: Add northbridge support for Hygon family 18h model 4h") Signed-off-by: Liao Xuan --- arch/x86/kernel/amd_nb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 3961ffe9eec0..ae45edc34d70 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -451,8 +451,9 @@ static int northbridge_init_f18h_m4h(const struct pci_device_id *root_ids, amd_northbridges.nb = NULL; ret: - pr_err("Hygon Fam%xh Model%xh northbridge init failed(%d)!\n", - boot_cpu_data.x86, boot_cpu_data.x86_model, err); + if (!boot_cpu_has(X86_FEATURE_HYPERVISOR)) + pr_err("Hygon Fam%xh Model%xh northbridge init failed(%d)!\n", + boot_cpu_data.x86, boot_cpu_data.x86_model, err); return err; } -- Gitee