aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_pm.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-11-03 12:35:04 +0000
committerIan Campbell <ian.campbell@citrix.com>2010-11-03 12:35:04 +0000
commitc894e6dae793aef1b08bfd6b56e93b828e0cbf2e (patch)
tree63daafea8b4aa357e3b4f6adaf3fb763eb91b2da /tools/libxc/xc_pm.c
parentf0188031b64c3c83e6dc2dd85767800b439ac704 (diff)
downloadxen-c894e6dae793aef1b08bfd6b56e93b828e0cbf2e.tar.gz
xen-c894e6dae793aef1b08bfd6b56e93b828e0cbf2e.tar.bz2
xen-c894e6dae793aef1b08bfd6b56e93b828e0cbf2e.zip
libxc: fix bounce buffers in xc_pm_get_cx_stat and xc_pm_get_pxstat
We should bounce the buffers themselves, not the pointers to them! Error introduced by 22292:a1b39d2b9001 and reported by Yang Z Zhang. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xc_pm.c')
-rw-r--r--tools/libxc/xc_pm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libxc/xc_pm.c b/tools/libxc/xc_pm.c
index fd88c38b1f..590e15d623 100644
--- a/tools/libxc/xc_pm.c
+++ b/tools/libxc/xc_pm.c
@@ -46,8 +46,8 @@ int xc_pm_get_pxstat(xc_interface *xch, int cpuid, struct xc_px_stat *pxpt)
{
DECLARE_SYSCTL;
/* Sizes unknown until xc_pm_get_max_px */
- DECLARE_NAMED_HYPERCALL_BOUNCE(trans, &pxpt->trans_pt, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
- DECLARE_NAMED_HYPERCALL_BOUNCE(pt, &pxpt->pt, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
+ DECLARE_NAMED_HYPERCALL_BOUNCE(trans, pxpt->trans_pt, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
+ DECLARE_NAMED_HYPERCALL_BOUNCE(pt, pxpt->pt, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
int max_px, ret;
@@ -124,8 +124,8 @@ int xc_pm_get_max_cx(xc_interface *xch, int cpuid, int *max_cx)
int xc_pm_get_cxstat(xc_interface *xch, int cpuid, struct xc_cx_stat *cxpt)
{
DECLARE_SYSCTL;
- DECLARE_NAMED_HYPERCALL_BOUNCE(triggers, &cxpt->triggers, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
- DECLARE_NAMED_HYPERCALL_BOUNCE(residencies, &cxpt->residencies, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
+ DECLARE_NAMED_HYPERCALL_BOUNCE(triggers, cxpt->triggers, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
+ DECLARE_NAMED_HYPERCALL_BOUNCE(residencies, cxpt->residencies, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
int max_cx, ret;
if( !cxpt || !(cxpt->triggers) || !(cxpt->residencies) )