From 857cdb0c4fee245c9a00108e5fae690d659fbcdc Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 18 Sep 2019 10:16:56 +0800 Subject: [PATCH] Fix the first problem: CPUID(EAX = 10H, ECX = ResID=1 or 2).EAX Bits 04 - 00: Length of the capacity bit mask for the corresponding ResID using minus-one notation Tracked-On:#3675 Signed-off-by: Andy --- hypervisor/arch/x86/cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/arch/x86/cat.c b/hypervisor/arch/x86/cat.c index e2393aca9..587621596 100644 --- a/hypervisor/arch/x86/cat.c +++ b/hypervisor/arch/x86/cat.c @@ -44,7 +44,7 @@ int32_t init_cat_cap_info(void) * CPUID.(EAX=0x10,ECX=ResID):EDX[15:0] reports the maximun CLOS supported */ cpuid_subleaf(CPUID_RSD_ALLOCATION, cat_cap_info.res_id, &eax, &ebx, &ecx, &edx); - cat_cap_info.cbm_len = (uint16_t)((eax & 0xfU) + 1U); + cat_cap_info.cbm_len = (uint16_t)((eax & 0x1fU) + 1U); cat_cap_info.bitmask = ebx; cat_cap_info.clos_max = (uint16_t)(edx & 0xffffU);