From: Brendan Gregg Date: Wed, 25 Nov 2015 10:12:55 +0000 (+0100) Subject: x86/VPMU: return correct fixed PMC count X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2198 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7d596f5ad70969d8171e1eb5b7a39d0dc6c11dc2;p=xen.git x86/VPMU: return correct fixed PMC count Fixes a register typo. Signed-off-by: Brendan Gregg Reviewed-by: Dietmar Hahn Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c index 12f80aeb70..d5ea7fe2a3 100644 --- a/xen/arch/x86/cpu/vpmu_intel.c +++ b/xen/arch/x86/cpu/vpmu_intel.c @@ -166,10 +166,9 @@ static int core2_get_arch_pmc_count(void) */ static int core2_get_fixed_pmc_count(void) { - u32 eax; + u32 edx = cpuid_edx(0xa); - eax = cpuid_eax(0xa); - return MASK_EXTR(eax, PMU_FIXED_NR_MASK); + return MASK_EXTR(edx, PMU_FIXED_NR_MASK); } /* edx bits 5-12: Bit width of fixed-function performance counters */