From: Brendan Gregg Subject: [PATCH v2 1/2] x86/VPMU: return correct fixed PMC count Date: Tue, 24 Nov 2015 15:53:11 -0800 Message-ID: <1448409192-4914-2-git-send-email-bgregg@netflix.com> References: <1448409192-4914-1-git-send-email-bgregg@netflix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1448409192-4914-1-git-send-email-bgregg@netflix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: boris.ostrovsky@oracle.com, Brendan Gregg , dietmar.hahn@ts.fujitsu.com List-Id: xen-devel@lists.xenproject.org Fixes a register typo. Signed-off-by: Brendan Gregg --- xen/arch/x86/cpu/vpmu_intel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c index 12f80ae..8d83a1a 100644 --- a/xen/arch/x86/cpu/vpmu_intel.c +++ b/xen/arch/x86/cpu/vpmu_intel.c @@ -166,10 +166,10 @@ static int core2_get_arch_pmc_count(void) */ static int core2_get_fixed_pmc_count(void) { - u32 eax; + u32 edx; - eax = cpuid_eax(0xa); - return MASK_EXTR(eax, PMU_FIXED_NR_MASK); + edx = cpuid_edx(0xa); + return MASK_EXTR(edx, PMU_FIXED_NR_MASK); } /* edx bits 5-12: Bit width of fixed-function performance counters */ -- 1.9.1