WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Fix bug in VMX VPMU fixed function PMC offset

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Fix bug in VMX VPMU fixed function PMC offset
From: "John, Jaiber J" <jaiber.j.john@xxxxxxxxx>
Date: Mon, 21 Jun 2010 11:22:20 +0530
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Shan, Haitao" <haitao.shan@xxxxxxxxx>, "keir.fraser@xxxxxxxxxxxxx" <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Sun, 20 Jun 2010 22:53:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcsRBendOc8yVNzXTSeLFU51kOZ9fw==
Thread-topic: Fix bug in VMX VPMU fixed function PMC offset
This is a minor fix to the calculation of bit-width of fixed function perfmon 
counters in Intel processors.
Bits 5-12 of edx register should be calculated as (edx & 0x1fe0) >>5 instead of 
using 0x1f70.


diff -r b9c541d9c138 xen/arch/x86/hvm/vmx/vpmu_core2.c
--- a/xen/arch/x86/hvm/vmx/vpmu_core2.c Tue Jun 15 13:27:14 2010 +0100
+++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c Mon Jun 21 10:54:39 2010 +0530
@@ -83,7 +83,7 @@
 {
     u32 eax, ebx, ecx, edx;
     cpuid(0xa, &eax, &ebx, &ecx, &edx);
-    return ((edx & 0x1f70) >> 5);
+    return ((edx & 0x1fe0) >> 5);
 }

 static int is_core2_vpmu_msr(u32 msr_index, int *type, int *index)



 Thanks,
 Jaiber


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Fix bug in VMX VPMU fixed function PMC offset, John, Jaiber J <=