Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xen: fix HYPERVISOR_dm_op() prototype

Change the third parameter to be the required struct xen_dm_op_buf *
instead of a generic void * (which blindly accepts any pointer).

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>

authored by

Sergey Dyasli and committed by
Juergen Gross
a2237ae7 4e93b648

+7 -2
+3 -1
arch/x86/include/asm/xen/hypercall.h
··· 50 50 #include <xen/interface/platform.h> 51 51 #include <xen/interface/xen-mca.h> 52 52 53 + struct xen_dm_op_buf; 54 + 53 55 /* 54 56 * The hypercall asms have to meet several constraints: 55 57 * - Work on 32- and 64-bit. ··· 476 474 477 475 static inline int 478 476 HYPERVISOR_dm_op( 479 - domid_t dom, unsigned int nr_bufs, void *bufs) 477 + domid_t dom, unsigned int nr_bufs, struct xen_dm_op_buf *bufs) 480 478 { 481 479 return _hypercall3(int, dm_op, dom, nr_bufs, bufs); 482 480 }
+4 -1
include/xen/arm/hypercall.h
··· 39 39 #include <xen/interface/sched.h> 40 40 #include <xen/interface/platform.h> 41 41 42 + struct xen_dm_op_buf; 43 + 42 44 long privcmd_call(unsigned call, unsigned long a1, 43 45 unsigned long a2, unsigned long a3, 44 46 unsigned long a4, unsigned long a5); ··· 55 53 int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args); 56 54 int HYPERVISOR_tmem_op(void *arg); 57 55 int HYPERVISOR_vm_assist(unsigned int cmd, unsigned int type); 58 - int HYPERVISOR_dm_op(domid_t domid, unsigned int nr_bufs, void *bufs); 56 + int HYPERVISOR_dm_op(domid_t domid, unsigned int nr_bufs, 57 + struct xen_dm_op_buf *bufs); 59 58 int HYPERVISOR_platform_op_raw(void *arg); 60 59 static inline int HYPERVISOR_platform_op(struct xen_platform_op *op) 61 60 {