[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [Q] Allow rdpmc access from DOM-0


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.