mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk> --HG-- rename : tools/libxc/xc.h => tools/libxc/xenctrl.h
39 lines
751 B
C
39 lines
751 B
C
/*
|
|
* Interface to Xen MSR hypercalls.
|
|
*
|
|
* $Id: cpuperf_xeno.h,v 1.1 2003/10/13 16:49:44 jrb44 Exp $
|
|
*
|
|
* $Log: cpuperf_xeno.h,v $
|
|
* Revision 1.1 2003/10/13 16:49:44 jrb44
|
|
* Initial revision
|
|
*
|
|
*/
|
|
|
|
#include <xenctrl.h>
|
|
|
|
static int xc_handle;
|
|
|
|
void xen_init()
|
|
{
|
|
if ( (xc_handle = xc_interface_open()) == -1 )
|
|
{
|
|
fprintf(stderr, "Error opening xc interface: %d (%s)\n",
|
|
errno, strerror(errno));
|
|
exit(-1);
|
|
}
|
|
|
|
}
|
|
|
|
void dom0_wrmsr( int cpu_mask, int msr, unsigned int low, unsigned int high )
|
|
{
|
|
xc_msr_write (xc_handle, cpu_mask, msr, low, high);
|
|
}
|
|
|
|
unsigned long long dom0_rdmsr( int cpu_mask, int msr )
|
|
{
|
|
return xc_msr_read(xc_handle, cpu_mask, msr);
|
|
}
|
|
|
|
// End of $RCSfile: cpuperf_xeno.h,v $
|
|
|