From: Andrew Cooper Date: Tue, 31 Jan 2017 19:15:17 +0000 (+0000) Subject: x86/dmop: Fix compat_dm_op() ABI X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2868 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8844ed299a;p=xen.git x86/dmop: Fix compat_dm_op() ABI The parameter to compat_dm_op() is a pointer to an array of compat_dm_op_buf_t's in guest RAM. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/hvm/dm.c b/xen/arch/x86/hvm/dm.c index 6a722a5dc4..2122c45a12 100644 --- a/xen/arch/x86/hvm/dm.c +++ b/xen/arch/x86/hvm/dm.c @@ -525,7 +525,7 @@ CHECK_dm_op_inject_msi; int compat_dm_op(domid_t domid, unsigned int nr_bufs, - COMPAT_HANDLE_PARAM(compat_dm_op_buf_t) bufs) + XEN_GUEST_HANDLE_PARAM(void) bufs) { struct xen_dm_op_buf nat[MAX_NR_BUFS]; unsigned int i; @@ -538,7 +538,7 @@ int compat_dm_op(domid_t domid, { struct compat_dm_op_buf cmp; - if ( copy_from_compat_offset(&cmp, bufs, i, 1) ) + if ( copy_from_guest_offset(&cmp, bufs, i, 1) ) return -EFAULT; #define XLAT_dm_op_buf_HNDL_h(_d_, _s_) \ diff --git a/xen/include/xen/hypercall.h b/xen/include/xen/hypercall.h index 8d4824feff..cc99aea57d 100644 --- a/xen/include/xen/hypercall.h +++ b/xen/include/xen/hypercall.h @@ -203,7 +203,7 @@ extern int compat_dm_op( domid_t domid, unsigned int nr_bufs, - COMPAT_HANDLE_PARAM(compat_dm_op_buf_t) bufs); + XEN_GUEST_HANDLE_PARAM(void) bufs); #endif