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] [Q] Allow rdpmc access from DOM-0

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [Q] Allow rdpmc access from DOM-0
From: "Mohapatra, Hemant" <Hemant.Mohapatra@xxxxxxx>
Date: Thu, 6 Sep 2007 08:44:53 -0500
Delivery-date: Thu, 06 Sep 2007 06:45:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcfwVQH+9J//LtPURtKs0pYAbvrHOQANtvuA
Thread-topic: [Q] Allow rdpmc access from DOM-0
I am trying to allow rdpmc access from Dom0 for some performance
measurement related work I am doing. The platform is x86_64 and I am
running the latest xen-unstable distribution. I've traveresed around the
xen code and as per my understanding, here's a short snippet of what
I've done to get rdpmc working through DOM0. I have only recently begun
to go through Xen source-code, please feel free to offer comments:

1) Added a relevant section for RDPMC in /xen/arch/x86/traps.c (case
0x33; right under RDMSR (0x32)).

2) Wrote a rdpmc_safe assembly code in xen/include/asm-x86/msr.h (based
on rdmsr_safe in the same file).

3) Added code in xen/arch/x86/x86_emulate.c to interpret the opcode for
RDPMC and call read_pmc (based off of read_msr in the same file).

4) Added relevant sections in xen/include/asm/x86_emulate.h for read_pmc
(based off of read_msr).


I boot into the new kernel but am still unable to trap rdpmc
instructions from DOM0. Is there any step I am missing in my attempt to
trap+emulate rdpmc?

Thanks,
Hemant




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

<Prev in Thread] Current Thread [Next in Thread>