diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c index 27f83c5b8f2fcfb437b26e71dd0d1bde2061eea8..1a8d93a0846716081d2b9576a66ab5f132962964 100644 --- a/arch/x86/kernel/cpu/cacheinfo.c +++ b/arch/x86/kernel/cpu/cacheinfo.c @@ -693,8 +693,9 @@ void cacheinfo_hygon_init_llc_id(struct cpuinfo_x86 *c, int cpu) if (!cpuid_edx(0x80000006)) return; - if (c->x86_model < 0x5 || - (c->x86_model >= 0x10 && c->x86_model <= 0x1f)) { + if ((c->x86_model < 0x5 || + (c->x86_model >= 0x10 && c->x86_model <= 0x1f)) && + !boot_cpu_has(X86_FEATURE_HYPERVISOR)) { /* * LLC is at the core complex level. * Core complex ID is ApicId[3] for these processors.