ia64/xen-unstable

view tools/misc/cpuperf/cpuperf_xeno.h @ 6403:6e899a3840b2

Rename libxc => libxenctrl and xc.h => xen/xenctrl.h
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Wed Aug 24 23:07:29 2005 +0000 (2005-08-24)
parents cfee4c4a8ed6
children 2f20c2fce2c5 e24fd7012ffb 4abd299ef2f6 3428d58a85e1 b54144915ae6 0610add7c3fe b4b3f6be5226
line source
1 /*
2 * Interface to Xen MSR hypercalls.
3 *
4 * $Id: cpuperf_xeno.h,v 1.1 2003/10/13 16:49:44 jrb44 Exp $
5 *
6 * $Log: cpuperf_xeno.h,v $
7 * Revision 1.1 2003/10/13 16:49:44 jrb44
8 * Initial revision
9 *
10 */
12 #include <xenctrl.h>
14 static int xc_handle;
16 void xen_init()
17 {
18 if ( (xc_handle = xc_interface_open()) == -1 )
19 {
20 fprintf(stderr, "Error opening xc interface: %d (%s)\n",
21 errno, strerror(errno));
22 exit(-1);
23 }
25 }
27 void dom0_wrmsr( int cpu_mask, int msr, unsigned int low, unsigned int high )
28 {
29 xc_msr_write (xc_handle, cpu_mask, msr, low, high);
30 }
32 unsigned long long dom0_rdmsr( int cpu_mask, int msr )
33 {
34 return xc_msr_read(xc_handle, cpu_mask, msr);
35 }
37 // End of $RCSfile: cpuperf_xeno.h,v $