aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenmon
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-08-25 18:39:10 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-08-25 18:39:10 +0100
commit1df421476a141955f4f04b7ad0fbaf73e57c8358 (patch)
tree6500dea6303559d54abd1b0ff49db083c463d0d8 /tools/xenmon
parente76cb15dcecf1b78ecb1365ea0f955a97c5d2dd1 (diff)
downloadxen-1df421476a141955f4f04b7ad0fbaf73e57c8358.tar.gz
xen-1df421476a141955f4f04b7ad0fbaf73e57c8358.tar.bz2
xen-1df421476a141955f4f04b7ad0fbaf73e57c8358.zip
Replace dom0_ops hypercall with three new hypercalls:
1. platform_op -- used by dom0 kernel to perform actions on the hardware platform (e.g., MTRR access, microcode update, platform quirks, ...) 2. domctl -- used by management tools to control a specified domain 3. sysctl -- used by management tools for system-wide actions Benefits include more sensible factoring of actions to hypercalls. Also allows tool compatibility to be tracked separately from the dom0 kernel. The assumption is that it will be easier to replace libxenctrl, libxenguest and Xen as a matched set if the dom0 kernel does not need to be replaced too (e.g., because that would require vendor revalidation). From here on we hope to maintain dom0 kernel compatibility. This promise is not extended to tool compatibility beyond the existing guarantee that compatibility will not be broken within a three-level stable release [3.0.2, 3.0.3, etc.]. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/xenmon')
-rw-r--r--tools/xenmon/setmask.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/tools/xenmon/setmask.c b/tools/xenmon/setmask.c
index 333280d359..676dd6dcf7 100644
--- a/tools/xenmon/setmask.c
+++ b/tools/xenmon/setmask.c
@@ -40,15 +40,14 @@ typedef struct { int counter; } atomic_t;
int main(int argc, char * argv[])
{
-
- dom0_op_t op;
+ struct xen_sysctl sysctl;
int ret;
int xc_handle = xc_interface_open();
- op.cmd = DOM0_TBUFCONTROL;
- op.interface_version = DOM0_INTERFACE_VERSION;
- op.u.tbufcontrol.op = DOM0_TBUF_GET_INFO;
- ret = xc_dom0_op(xc_handle, &op);
+ sysctl.cmd = XEN_SYSCTL_tbuf_op;
+ sysctl.interface_version = XEN_SYSCTL_INTERFACE_VERSION;
+ sysctl.u.tbuf_op.cmd = XEN_SYSCTL_TBUFOP_get_info;
+ ret = xc_sysctl(xc_handle, &sysctl);
if ( ret != 0 )
{
perror("Failure to get event mask from Xen");
@@ -56,26 +55,26 @@ int main(int argc, char * argv[])
}
else
{
- printf("Current event mask: 0x%.8x\n", op.u.tbufcontrol.evt_mask);
+ printf("Current event mask: 0x%.8x\n", sysctl.u.tbuf_op.evt_mask);
}
- op.cmd = DOM0_TBUFCONTROL;
- op.interface_version = DOM0_INTERFACE_VERSION;
- op.u.tbufcontrol.op = DOM0_TBUF_SET_EVT_MASK;
- op.u.tbufcontrol.evt_mask = XENMON;
+ sysctl.cmd = XEN_SYSCTL_tbuf_op;
+ sysctl.interface_version = XEN_SYSCTL_INTERFACE_VERSION;
+ sysctl.u.tbuf_op.cmd = XEN_SYSCTL_TBUFOP_set_evt_mask;
+ sysctl.u.tbuf_op.evt_mask = XENMON;
- ret = xc_dom0_op(xc_handle, &op);
- printf("Setting mask to 0x%.8x\n", op.u.tbufcontrol.evt_mask);
+ ret = xc_sysctl(xc_handle, &sysctl);
+ printf("Setting mask to 0x%.8x\n", sysctl.u.tbuf_op.evt_mask);
if ( ret != 0 )
{
perror("Failure to get scheduler ID from Xen");
exit(1);
}
- op.cmd = DOM0_TBUFCONTROL;
- op.interface_version = DOM0_INTERFACE_VERSION;
- op.u.tbufcontrol.op = DOM0_TBUF_GET_INFO;
- ret = xc_dom0_op(xc_handle, &op);
+ sysctl.cmd = XEN_SYSCTL_tbuf_op;
+ sysctl.interface_version = XEN_SYSCTL_INTERFACE_VERSION;
+ sysctl.u.tbuf_op.cmd = XEN_SYSCTL_TBUFOP_get_info;
+ ret = xc_sysctl(xc_handle, &sysctl);
if ( ret != 0 )
{
perror("Failure to get event mask from Xen");
@@ -83,7 +82,7 @@ int main(int argc, char * argv[])
}
else
{
- printf("Current event mask: 0x%.8x\n", op.u.tbufcontrol.evt_mask);
+ printf("Current event mask: 0x%.8x\n", sysctl.u.tbuf_op.evt_mask);
}
xc_interface_close(xc_handle);
return 0;