ia64/xen-unstable

view tools/libxc/xc_tbuf.c @ 9488:0a6f5527ca4b

[IA64] set itv handoff as masked and enable reading irr[0-3]

Set initial vcpu itv handoff state to mask the timer vector.
This seems to match hardware and makes logical sense from a
spurious interrupt perspective. Enable vcpu_get_irr[0-3]
functions as they seem to work and have the proper backing.
This enables the check_sal_cache_flush() in arch/ia64/kernel.sal.c
to work unmodified, allowing us to remove the Xen changes from
the file (and thus the file from the sparse tree).

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Tue Apr 04 09:39:45 2006 -0600 (2006-04-04)
parents 602aefe7bd48
children 74ee53209cca
line source
1 /******************************************************************************
2 * xc_tbuf.c
3 *
4 * API for manipulating and accessing trace buffer parameters
5 *
6 * Copyright (c) 2005, Rob Gardner
7 */
9 #include "xc_private.h"
11 int xc_tbuf_enable(int xc_handle, int enable)
12 {
13 DECLARE_DOM0_OP;
15 op.cmd = DOM0_TBUFCONTROL;
16 op.interface_version = DOM0_INTERFACE_VERSION;
17 if (enable)
18 op.u.tbufcontrol.op = DOM0_TBUF_ENABLE;
19 else
20 op.u.tbufcontrol.op = DOM0_TBUF_DISABLE;
22 return xc_dom0_op(xc_handle, &op);
23 }
25 int xc_tbuf_set_size(int xc_handle, uint32_t size)
26 {
27 DECLARE_DOM0_OP;
29 op.cmd = DOM0_TBUFCONTROL;
30 op.interface_version = DOM0_INTERFACE_VERSION;
31 op.u.tbufcontrol.op = DOM0_TBUF_SET_SIZE;
32 op.u.tbufcontrol.size = size;
34 return xc_dom0_op(xc_handle, &op);
35 }
37 int xc_tbuf_get_size(int xc_handle, uint32_t *size)
38 {
39 int rc;
40 DECLARE_DOM0_OP;
42 op.cmd = DOM0_TBUFCONTROL;
43 op.interface_version = DOM0_INTERFACE_VERSION;
44 op.u.tbufcontrol.op = DOM0_TBUF_GET_INFO;
46 rc = xc_dom0_op(xc_handle, &op);
47 if (rc == 0)
48 *size = op.u.tbufcontrol.size;
49 return rc;
50 }