diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-08-07 15:53:06 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-08-07 15:53:06 +0100 |
commit | a6e8b7effa20241c47ecd5c5fad549ac64d903a5 (patch) | |
tree | 9f06f22bd190243500fa6a9a1fdc6bcd158ebebf /tools/libxc/xc_misc.c | |
parent | ed79bfa130dbc949ec2d23cf7d6d538d9222691e (diff) | |
download | xen-a6e8b7effa20241c47ecd5c5fad549ac64d903a5.tar.gz xen-a6e8b7effa20241c47ecd5c5fad549ac64d903a5.tar.bz2 xen-a6e8b7effa20241c47ecd5c5fad549ac64d903a5.zip |
Change DOM0_PERFCCONTROL: remove array limit.
Descriptors and values are passed by two distinct buffers.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
Diffstat (limited to 'tools/libxc/xc_misc.c')
-rw-r--r-- | tools/libxc/xc_misc.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c index 4c0cb24b90..5a63e9e719 100644 --- a/tools/libxc/xc_misc.c +++ b/tools/libxc/xc_misc.c @@ -68,7 +68,10 @@ int xc_sched_id(int xc_handle, int xc_perfc_control(int xc_handle, uint32_t opcode, - xc_perfc_desc_t *desc) + xc_perfc_desc_t *desc, + xc_perfc_val_t *val, + int *nbr_desc, + int *nbr_val) { int rc; DECLARE_DOM0_OP; @@ -76,10 +79,16 @@ int xc_perfc_control(int xc_handle, op.cmd = DOM0_PERFCCONTROL; op.u.perfccontrol.op = opcode; set_xen_guest_handle(op.u.perfccontrol.desc, desc); + set_xen_guest_handle(op.u.perfccontrol.val, val); rc = do_dom0_op(xc_handle, &op); - return (rc == 0) ? op.u.perfccontrol.nr_counters : rc; + if (nbr_desc) + *nbr_desc = op.u.perfccontrol.nr_counters; + if (nbr_val) + *nbr_val = op.u.perfccontrol.nr_vals; + + return rc; } long long xc_msr_read(int xc_handle, int cpu_mask, int msr) |