diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-10-17 16:43:53 +0100 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-10-17 16:43:53 +0100 |
commit | e7a527e100dd3f72e0f9b672ab97324d80e064df (patch) | |
tree | fa5158057bf0bc481afd80c5f85b5da51408c4fd /xen/common | |
parent | 1ab8784d69076c8bb21cef2f0529e3ebebbc3606 (diff) | |
download | xen-e7a527e100dd3f72e0f9b672ab97324d80e064df.tar.gz xen-e7a527e100dd3f72e0f9b672ab97324d80e064df.tar.bz2 xen-e7a527e100dd3f72e0f9b672ab97324d80e064df.zip |
xen: replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when appropriate
Note: these changes don't make any difference on x86.
Replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when it is used as
an hypercall argument.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/common')
-rw-r--r-- | xen/common/compat/domain.c | 2 | ||||
-rw-r--r-- | xen/common/compat/grant_table.c | 8 | ||||
-rw-r--r-- | xen/common/compat/memory.c | 4 | ||||
-rw-r--r-- | xen/common/domain.c | 2 | ||||
-rw-r--r-- | xen/common/domctl.c | 2 | ||||
-rw-r--r-- | xen/common/event_channel.c | 2 | ||||
-rw-r--r-- | xen/common/grant_table.c | 36 | ||||
-rw-r--r-- | xen/common/kernel.c | 4 | ||||
-rw-r--r-- | xen/common/kexec.c | 17 | ||||
-rw-r--r-- | xen/common/memory.c | 4 | ||||
-rw-r--r-- | xen/common/schedule.c | 2 | ||||
-rw-r--r-- | xen/common/sysctl.c | 2 | ||||
-rw-r--r-- | xen/common/tmem.c | 45 | ||||
-rw-r--r-- | xen/common/tmem_xen.c | 8 | ||||
-rw-r--r-- | xen/common/xenoprof.c | 8 |
15 files changed, 76 insertions, 70 deletions
diff --git a/xen/common/compat/domain.c b/xen/common/compat/domain.c index 40a028733b..e4c8ceb00e 100644 --- a/xen/common/compat/domain.c +++ b/xen/common/compat/domain.c @@ -15,7 +15,7 @@ CHECK_vcpu_set_periodic_timer; #undef xen_vcpu_set_periodic_timer -int compat_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE(void) arg) +int compat_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg) { struct domain *d = current->domain; struct vcpu *v; diff --git a/xen/common/compat/grant_table.c b/xen/common/compat/grant_table.c index edd20c6bd3..b5249559d6 100644 --- a/xen/common/compat/grant_table.c +++ b/xen/common/compat/grant_table.c @@ -52,12 +52,12 @@ CHECK_gnttab_swap_grant_ref; #undef xen_gnttab_swap_grant_ref int compat_grant_table_op(unsigned int cmd, - XEN_GUEST_HANDLE(void) cmp_uop, + XEN_GUEST_HANDLE_PARAM(void) cmp_uop, unsigned int count) { int rc = 0; unsigned int i; - XEN_GUEST_HANDLE(void) cnt_uop; + XEN_GUEST_HANDLE_PARAM(void) cnt_uop; set_xen_guest_handle(cnt_uop, NULL); switch ( cmd ) @@ -206,7 +206,7 @@ int compat_grant_table_op(unsigned int cmd, } if ( rc >= 0 ) { - XEN_GUEST_HANDLE(gnttab_transfer_compat_t) xfer; + XEN_GUEST_HANDLE_PARAM(gnttab_transfer_compat_t) xfer; xfer = guest_handle_cast(cmp_uop, gnttab_transfer_compat_t); guest_handle_add_offset(xfer, i); @@ -251,7 +251,7 @@ int compat_grant_table_op(unsigned int cmd, } if ( rc >= 0 ) { - XEN_GUEST_HANDLE(gnttab_copy_compat_t) copy; + XEN_GUEST_HANDLE_PARAM(gnttab_copy_compat_t) copy; copy = guest_handle_cast(cmp_uop, gnttab_copy_compat_t); guest_handle_add_offset(copy, i); diff --git a/xen/common/compat/memory.c b/xen/common/compat/memory.c index e7257cc53e..996151caed 100644 --- a/xen/common/compat/memory.c +++ b/xen/common/compat/memory.c @@ -13,7 +13,7 @@ CHECK_TYPE(domid); #undef compat_domid_t #undef xen_domid_t -int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE(void) compat) +int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat) { int rc, split, op = cmd & MEMOP_CMD_MASK; unsigned int start_extent = cmd >> MEMOP_EXTENT_SHIFT; @@ -22,7 +22,7 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE(void) compat) { unsigned int i, end_extent = 0; union { - XEN_GUEST_HANDLE(void) hnd; + XEN_GUEST_HANDLE_PARAM(void) hnd; struct xen_memory_reservation *rsrv; struct xen_memory_exchange *xchg; struct xen_remove_from_physmap *xrfp; diff --git a/xen/common/domain.c b/xen/common/domain.c index 52489b3924..0e3e36aa1b 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -827,7 +827,7 @@ void vcpu_reset(struct vcpu *v) } -long do_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE(void) arg) +long do_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg) { struct domain *d = current->domain; struct vcpu *v; diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 2b1f1829da..e153cb47ae 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -239,7 +239,7 @@ void domctl_lock_release(void) spin_unlock(¤t->domain->hypercall_deadlock_mutex); } -long do_domctl(XEN_GUEST_HANDLE(xen_domctl_t) u_domctl) +long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) { long ret = 0; struct xen_domctl curop, *op = &curop; diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 53777f8888..a80a0d1fcd 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -970,7 +970,7 @@ out: } -long do_event_channel_op(int cmd, XEN_GUEST_HANDLE(void) arg) +long do_event_channel_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) { long rc; diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index c8e342b554..f4ae9ee3a3 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -833,7 +833,7 @@ __gnttab_map_grant_ref( static long gnttab_map_grant_ref( - XEN_GUEST_HANDLE(gnttab_map_grant_ref_t) uop, unsigned int count) + XEN_GUEST_HANDLE_PARAM(gnttab_map_grant_ref_t) uop, unsigned int count) { int i; struct gnttab_map_grant_ref op; @@ -1102,7 +1102,7 @@ __gnttab_unmap_grant_ref( static long gnttab_unmap_grant_ref( - XEN_GUEST_HANDLE(gnttab_unmap_grant_ref_t) uop, unsigned int count) + XEN_GUEST_HANDLE_PARAM(gnttab_unmap_grant_ref_t) uop, unsigned int count) { int i, c, partial_done, done = 0; struct gnttab_unmap_grant_ref op; @@ -1164,7 +1164,7 @@ __gnttab_unmap_and_replace( static long gnttab_unmap_and_replace( - XEN_GUEST_HANDLE(gnttab_unmap_and_replace_t) uop, unsigned int count) + XEN_GUEST_HANDLE_PARAM(gnttab_unmap_and_replace_t) uop, unsigned int count) { int i, c, partial_done, done = 0; struct gnttab_unmap_and_replace op; @@ -1316,7 +1316,7 @@ active_alloc_failed: static long gnttab_setup_table( - XEN_GUEST_HANDLE(gnttab_setup_table_t) uop, unsigned int count) + XEN_GUEST_HANDLE_PARAM(gnttab_setup_table_t) uop, unsigned int count) { struct gnttab_setup_table op; struct domain *d; @@ -1395,7 +1395,7 @@ gnttab_setup_table( static long gnttab_query_size( - XEN_GUEST_HANDLE(gnttab_query_size_t) uop, unsigned int count) + XEN_GUEST_HANDLE_PARAM(gnttab_query_size_t) uop, unsigned int count) { struct gnttab_query_size op; struct domain *d; @@ -1517,7 +1517,7 @@ gnttab_prepare_for_transfer( static long gnttab_transfer( - XEN_GUEST_HANDLE(gnttab_transfer_t) uop, unsigned int count) + XEN_GUEST_HANDLE_PARAM(gnttab_transfer_t) uop, unsigned int count) { struct domain *d = current->domain; struct domain *e; @@ -2125,7 +2125,7 @@ __gnttab_copy( static long gnttab_copy( - XEN_GUEST_HANDLE(gnttab_copy_t) uop, unsigned int count) + XEN_GUEST_HANDLE_PARAM(gnttab_copy_t) uop, unsigned int count) { int i; struct gnttab_copy op; @@ -2144,7 +2144,7 @@ gnttab_copy( } static long -gnttab_set_version(XEN_GUEST_HANDLE(gnttab_set_version_t uop)) +gnttab_set_version(XEN_GUEST_HANDLE_PARAM(gnttab_set_version_t uop)) { gnttab_set_version_t op; struct domain *d = current->domain; @@ -2263,7 +2263,7 @@ out: } static long -gnttab_get_status_frames(XEN_GUEST_HANDLE(gnttab_get_status_frames_t) uop, +gnttab_get_status_frames(XEN_GUEST_HANDLE_PARAM(gnttab_get_status_frames_t) uop, int count) { gnttab_get_status_frames_t op; @@ -2327,7 +2327,7 @@ out1: } static long -gnttab_get_version(XEN_GUEST_HANDLE(gnttab_get_version_t uop)) +gnttab_get_version(XEN_GUEST_HANDLE_PARAM(gnttab_get_version_t uop)) { gnttab_get_version_t op; struct domain *d; @@ -2412,7 +2412,7 @@ out: } static long -gnttab_swap_grant_ref(XEN_GUEST_HANDLE(gnttab_swap_grant_ref_t uop), +gnttab_swap_grant_ref(XEN_GUEST_HANDLE_PARAM(gnttab_swap_grant_ref_t uop), unsigned int count) { int i; @@ -2433,7 +2433,7 @@ gnttab_swap_grant_ref(XEN_GUEST_HANDLE(gnttab_swap_grant_ref_t uop), long do_grant_table_op( - unsigned int cmd, XEN_GUEST_HANDLE(void) uop, unsigned int count) + unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) uop, unsigned int count) { long rc; @@ -2445,7 +2445,7 @@ do_grant_table_op( { case GNTTABOP_map_grant_ref: { - XEN_GUEST_HANDLE(gnttab_map_grant_ref_t) map = + XEN_GUEST_HANDLE_PARAM(gnttab_map_grant_ref_t) map = guest_handle_cast(uop, gnttab_map_grant_ref_t); if ( unlikely(!guest_handle_okay(map, count)) ) goto out; @@ -2459,7 +2459,7 @@ do_grant_table_op( } case GNTTABOP_unmap_grant_ref: { - XEN_GUEST_HANDLE(gnttab_unmap_grant_ref_t) unmap = + XEN_GUEST_HANDLE_PARAM(gnttab_unmap_grant_ref_t) unmap = guest_handle_cast(uop, gnttab_unmap_grant_ref_t); if ( unlikely(!guest_handle_okay(unmap, count)) ) goto out; @@ -2473,7 +2473,7 @@ do_grant_table_op( } case GNTTABOP_unmap_and_replace: { - XEN_GUEST_HANDLE(gnttab_unmap_and_replace_t) unmap = + XEN_GUEST_HANDLE_PARAM(gnttab_unmap_and_replace_t) unmap = guest_handle_cast(uop, gnttab_unmap_and_replace_t); if ( unlikely(!guest_handle_okay(unmap, count)) ) goto out; @@ -2497,7 +2497,7 @@ do_grant_table_op( } case GNTTABOP_transfer: { - XEN_GUEST_HANDLE(gnttab_transfer_t) transfer = + XEN_GUEST_HANDLE_PARAM(gnttab_transfer_t) transfer = guest_handle_cast(uop, gnttab_transfer_t); if ( unlikely(!guest_handle_okay(transfer, count)) ) goto out; @@ -2511,7 +2511,7 @@ do_grant_table_op( } case GNTTABOP_copy: { - XEN_GUEST_HANDLE(gnttab_copy_t) copy = + XEN_GUEST_HANDLE_PARAM(gnttab_copy_t) copy = guest_handle_cast(uop, gnttab_copy_t); if ( unlikely(!guest_handle_okay(copy, count)) ) goto out; @@ -2548,7 +2548,7 @@ do_grant_table_op( } case GNTTABOP_swap_grant_ref: { - XEN_GUEST_HANDLE(gnttab_swap_grant_ref_t) swap = + XEN_GUEST_HANDLE_PARAM(gnttab_swap_grant_ref_t) swap = guest_handle_cast(uop, gnttab_swap_grant_ref_t); if ( unlikely(!guest_handle_okay(swap, count)) ) goto out; diff --git a/xen/common/kernel.c b/xen/common/kernel.c index c915bbcb65..55caff662a 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -204,7 +204,7 @@ void __init do_initcalls(void) * Simple hypercalls. */ -DO(xen_version)(int cmd, XEN_GUEST_HANDLE(void) arg) +DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) { switch ( cmd ) { @@ -332,7 +332,7 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE(void) arg) return -ENOSYS; } -DO(nmi_op)(unsigned int cmd, XEN_GUEST_HANDLE(void) arg) +DO(nmi_op)(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) { struct xennmi_callback cb; long rc = 0; diff --git a/xen/common/kexec.c b/xen/common/kexec.c index 2bc3e33951..25ebd6ae97 100644 --- a/xen/common/kexec.c +++ b/xen/common/kexec.c @@ -613,7 +613,7 @@ static int kexec_get_range_internal(xen_kexec_range_t *range) return ret; } -static int kexec_get_range(XEN_GUEST_HANDLE(void) uarg) +static int kexec_get_range(XEN_GUEST_HANDLE_PARAM(void) uarg) { xen_kexec_range_t range; int ret = -EINVAL; @@ -629,7 +629,7 @@ static int kexec_get_range(XEN_GUEST_HANDLE(void) uarg) return ret; } -static int kexec_get_range_compat(XEN_GUEST_HANDLE(void) uarg) +static int kexec_get_range_compat(XEN_GUEST_HANDLE_PARAM(void) uarg) { #ifdef CONFIG_COMPAT xen_kexec_range_t range; @@ -777,7 +777,7 @@ static int kexec_load_unload_internal(unsigned long op, xen_kexec_load_t *load) return ret; } -static int kexec_load_unload(unsigned long op, XEN_GUEST_HANDLE(void) uarg) +static int kexec_load_unload(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) uarg) { xen_kexec_load_t load; @@ -788,7 +788,7 @@ static int kexec_load_unload(unsigned long op, XEN_GUEST_HANDLE(void) uarg) } static int kexec_load_unload_compat(unsigned long op, - XEN_GUEST_HANDLE(void) uarg) + XEN_GUEST_HANDLE_PARAM(void) uarg) { #ifdef CONFIG_COMPAT compat_kexec_load_t compat_load; @@ -813,7 +813,7 @@ static int kexec_load_unload_compat(unsigned long op, #endif /* CONFIG_COMPAT */ } -static int kexec_exec(XEN_GUEST_HANDLE(void) uarg) +static int kexec_exec(XEN_GUEST_HANDLE_PARAM(void) uarg) { xen_kexec_exec_t exec; xen_kexec_image_t *image; @@ -845,7 +845,8 @@ static int kexec_exec(XEN_GUEST_HANDLE(void) uarg) return -EINVAL; /* never reached */ } -static int do_kexec_op_internal(unsigned long op, XEN_GUEST_HANDLE(void) uarg, +static int do_kexec_op_internal(unsigned long op, + XEN_GUEST_HANDLE_PARAM(void) uarg, bool_t compat) { unsigned long flags; @@ -886,13 +887,13 @@ static int do_kexec_op_internal(unsigned long op, XEN_GUEST_HANDLE(void) uarg, return ret; } -long do_kexec_op(unsigned long op, XEN_GUEST_HANDLE(void) uarg) +long do_kexec_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) uarg) { return do_kexec_op_internal(op, uarg, 0); } #ifdef CONFIG_COMPAT -int compat_kexec_op(unsigned long op, XEN_GUEST_HANDLE(void) uarg) +int compat_kexec_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) uarg) { return do_kexec_op_internal(op, uarg, 1); } diff --git a/xen/common/memory.c b/xen/common/memory.c index 401d06c7d6..83e266646d 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -277,7 +277,7 @@ static void decrease_reservation(struct memop_args *a) a->nr_done = i; } -static long memory_exchange(XEN_GUEST_HANDLE(xen_memory_exchange_t) arg) +static long memory_exchange(XEN_GUEST_HANDLE_PARAM(xen_memory_exchange_t) arg) { struct xen_memory_exchange exch; PAGE_LIST_HEAD(in_chunk_list); @@ -517,7 +517,7 @@ static long memory_exchange(XEN_GUEST_HANDLE(xen_memory_exchange_t) arg) return rc; } -long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE(void) arg) +long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg) { struct domain *d; int rc, op; diff --git a/xen/common/schedule.c b/xen/common/schedule.c index eee74be50f..00812ac5b3 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -836,7 +836,7 @@ typedef long ret_t; #endif /* !COMPAT */ -ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE(void) arg) +ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) { ret_t ret = 0; diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c index ea6827886a..47142f41fc 100644 --- a/xen/common/sysctl.c +++ b/xen/common/sysctl.c @@ -27,7 +27,7 @@ #include <xsm/xsm.h> #include <xen/pmstat.h> -long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl) +long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) { long ret = 0; struct xen_sysctl curop, *op = &curop; diff --git a/xen/common/tmem.c b/xen/common/tmem.c index ed322b68de..128053731d 100644 --- a/xen/common/tmem.c +++ b/xen/common/tmem.c @@ -1444,7 +1444,7 @@ static inline void tmem_ensure_avail_pages(void) /************ TMEM CORE OPERATIONS ************************************/ static NOINLINE int do_tmem_put_compress(pgp_t *pgp, tmem_cli_mfn_t cmfn, - tmem_cli_va_t clibuf) + tmem_cli_va_param_t clibuf) { void *dst, *p; size_t size; @@ -1488,7 +1488,7 @@ out: static NOINLINE int do_tmem_dup_put(pgp_t *pgp, tmem_cli_mfn_t cmfn, pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len, - tmem_cli_va_t clibuf) + tmem_cli_va_param_t clibuf) { pool_t *pool; obj_t *obj; @@ -1579,7 +1579,7 @@ cleanup: static NOINLINE int do_tmem_put(pool_t *pool, OID *oidp, uint32_t index, tmem_cli_mfn_t cmfn, pagesize_t tmem_offset, - pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_t clibuf) + pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf) { obj_t *obj = NULL, *objfound = NULL, *objnew = NULL; pgp_t *pgp = NULL, *pgpdel = NULL; @@ -1722,7 +1722,7 @@ free: static NOINLINE int do_tmem_get(pool_t *pool, OID *oidp, uint32_t index, tmem_cli_mfn_t cmfn, pagesize_t tmem_offset, - pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_t clibuf) + pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf) { obj_t *obj; pgp_t *pgp; @@ -2066,8 +2066,8 @@ static int tmemc_flush_mem(cli_id_t cli_id, uint32_t kb) */ #define BSIZE 1024 -static int tmemc_list_client(client_t *c, tmem_cli_va_t buf, int off, - uint32_t len, bool_t use_long) +static int tmemc_list_client(client_t *c, tmem_cli_va_param_t buf, + int off, uint32_t len, bool_t use_long) { char info[BSIZE]; int i, n = 0, sum = 0; @@ -2119,7 +2119,7 @@ static int tmemc_list_client(client_t *c, tmem_cli_va_t buf, int off, return sum; } -static int tmemc_list_shared(tmem_cli_va_t buf, int off, uint32_t len, +static int tmemc_list_shared(tmem_cli_va_param_t buf, int off, uint32_t len, bool_t use_long) { char info[BSIZE]; @@ -2159,8 +2159,8 @@ static int tmemc_list_shared(tmem_cli_va_t buf, int off, uint32_t len, } #ifdef TMEM_PERF -static int tmemc_list_global_perf(tmem_cli_va_t buf, int off, uint32_t len, - bool_t use_long) +static int tmemc_list_global_perf(tmem_cli_va_param_t buf, int off, + uint32_t len, bool_t use_long) { char info[BSIZE]; int n = 0, sum = 0; @@ -2194,7 +2194,7 @@ static int tmemc_list_global_perf(tmem_cli_va_t buf, int off, uint32_t len, #define tmemc_list_global_perf(_buf,_off,_len,_use) (0) #endif -static int tmemc_list_global(tmem_cli_va_t buf, int off, uint32_t len, +static int tmemc_list_global(tmem_cli_va_param_t buf, int off, uint32_t len, bool_t use_long) { char info[BSIZE]; @@ -2226,7 +2226,7 @@ static int tmemc_list_global(tmem_cli_va_t buf, int off, uint32_t len, return sum; } -static int tmemc_list(cli_id_t cli_id, tmem_cli_va_t buf, uint32_t len, +static int tmemc_list(cli_id_t cli_id, tmem_cli_va_param_t buf, uint32_t len, bool_t use_long) { client_t *client; @@ -2338,7 +2338,7 @@ static NOINLINE int tmemc_shared_pool_auth(cli_id_t cli_id, uint64_t uuid_lo, } static NOINLINE int tmemc_save_subop(int cli_id, uint32_t pool_id, - uint32_t subop, tmem_cli_va_t buf, uint32_t arg1) + uint32_t subop, tmem_cli_va_param_t buf, uint32_t arg1) { client_t *client = tmh_client_from_cli_id(cli_id); pool_t *pool = (client == NULL || pool_id >= MAX_POOLS_PER_DOMAIN) @@ -2427,7 +2427,7 @@ static NOINLINE int tmemc_save_subop(int cli_id, uint32_t pool_id, } static NOINLINE int tmemc_save_get_next_page(int cli_id, uint32_t pool_id, - tmem_cli_va_t buf, uint32_t bufsize) + tmem_cli_va_param_t buf, uint32_t bufsize) { client_t *client = tmh_client_from_cli_id(cli_id); pool_t *pool = (client == NULL || pool_id >= MAX_POOLS_PER_DOMAIN) @@ -2479,7 +2479,7 @@ out: return ret; } -static NOINLINE int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_t buf, +static NOINLINE int tmemc_save_get_next_inv(int cli_id, tmem_cli_va_param_t buf, uint32_t bufsize) { client_t *client = tmh_client_from_cli_id(cli_id); @@ -2522,7 +2522,7 @@ out: } static int tmemc_restore_put_page(int cli_id, uint32_t pool_id, OID *oidp, - uint32_t index, tmem_cli_va_t buf, uint32_t bufsize) + uint32_t index, tmem_cli_va_param_t buf, uint32_t bufsize) { client_t *client = tmh_client_from_cli_id(cli_id); pool_t *pool = (client == NULL || pool_id >= MAX_POOLS_PER_DOMAIN) @@ -2566,7 +2566,8 @@ static NOINLINE int do_tmem_control(struct tmem_op *op) ret = tmemc_flush_mem(op->u.ctrl.cli_id,op->u.ctrl.arg1); break; case TMEMC_LIST: - ret = tmemc_list(op->u.ctrl.cli_id,op->u.ctrl.buf, + ret = tmemc_list(op->u.ctrl.cli_id, + guest_handle_cast(op->u.ctrl.buf, char), op->u.ctrl.arg1,op->u.ctrl.arg2); break; case TMEMC_SET_WEIGHT: @@ -2589,20 +2590,24 @@ static NOINLINE int do_tmem_control(struct tmem_op *op) case TMEMC_SAVE_GET_POOL_UUID: case TMEMC_SAVE_END: ret = tmemc_save_subop(op->u.ctrl.cli_id,pool_id,subop, - op->u.ctrl.buf,op->u.ctrl.arg1); + guest_handle_cast(op->u.ctrl.buf, char), + op->u.ctrl.arg1); break; case TMEMC_SAVE_GET_NEXT_PAGE: ret = tmemc_save_get_next_page(op->u.ctrl.cli_id, pool_id, - op->u.ctrl.buf, op->u.ctrl.arg1); + guest_handle_cast(op->u.ctrl.buf, char), + op->u.ctrl.arg1); break; case TMEMC_SAVE_GET_NEXT_INV: - ret = tmemc_save_get_next_inv(op->u.ctrl.cli_id, op->u.ctrl.buf, + ret = tmemc_save_get_next_inv(op->u.ctrl.cli_id, + guest_handle_cast(op->u.ctrl.buf, char), op->u.ctrl.arg1); break; case TMEMC_RESTORE_PUT_PAGE: ret = tmemc_restore_put_page(op->u.ctrl.cli_id,pool_id, oidp, op->u.ctrl.arg2, - op->u.ctrl.buf, op->u.ctrl.arg1); + guest_handle_cast(op->u.ctrl.buf, char), + op->u.ctrl.arg1); break; case TMEMC_RESTORE_FLUSH_PAGE: ret = tmemc_restore_flush_page(op->u.ctrl.cli_id,pool_id, diff --git a/xen/common/tmem_xen.c b/xen/common/tmem_xen.c index 9dc2a1d03a..25fbd6c39b 100644 --- a/xen/common/tmem_xen.c +++ b/xen/common/tmem_xen.c @@ -146,7 +146,7 @@ static inline void cli_put_page(void *cli_va, pfp_t *cli_pfp, EXPORT int tmh_copy_from_client(pfp_t *pfp, tmem_cli_mfn_t cmfn, pagesize_t tmem_offset, - pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_t clibuf) + pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_param_t clibuf) { unsigned long tmem_mfn, cli_mfn = 0; char *tmem_va, *cli_va = NULL; @@ -194,7 +194,7 @@ EXPORT int tmh_copy_from_client(pfp_t *pfp, } EXPORT int tmh_compress_from_client(tmem_cli_mfn_t cmfn, - void **out_va, size_t *out_len, tmem_cli_va_t clibuf) + void **out_va, size_t *out_len, tmem_cli_va_param_t clibuf) { int ret = 0; unsigned char *dmem = this_cpu(dstmem); @@ -227,7 +227,7 @@ EXPORT int tmh_compress_from_client(tmem_cli_mfn_t cmfn, EXPORT int tmh_copy_to_client(tmem_cli_mfn_t cmfn, pfp_t *pfp, pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len, - tmem_cli_va_t clibuf) + tmem_cli_va_param_t clibuf) { unsigned long tmem_mfn, cli_mfn = 0; char *tmem_va, *cli_va = NULL; @@ -265,7 +265,7 @@ EXPORT int tmh_copy_to_client(tmem_cli_mfn_t cmfn, pfp_t *pfp, } EXPORT int tmh_decompress_to_client(tmem_cli_mfn_t cmfn, void *tmem_va, - size_t size, tmem_cli_va_t clibuf) + size_t size, tmem_cli_va_param_t clibuf) { unsigned long cli_mfn = 0; pfp_t *cli_pfp = NULL; diff --git a/xen/common/xenoprof.c b/xen/common/xenoprof.c index 44a1fae858..ae0435bcee 100644 --- a/xen/common/xenoprof.c +++ b/xen/common/xenoprof.c @@ -404,7 +404,7 @@ static int add_active_list(domid_t domid) return 0; } -static int add_passive_list(XEN_GUEST_HANDLE(void) arg) +static int add_passive_list(XEN_GUEST_HANDLE_PARAM(void) arg) { struct xenoprof_passive passive; struct domain *d; @@ -585,7 +585,7 @@ void xenoprof_log_event(struct vcpu *vcpu, const struct cpu_user_regs *regs, -static int xenoprof_op_init(XEN_GUEST_HANDLE(void) arg) +static int xenoprof_op_init(XEN_GUEST_HANDLE_PARAM(void) arg) { struct domain *d = current->domain; struct xenoprof_init xenoprof_init; @@ -611,7 +611,7 @@ static int xenoprof_op_init(XEN_GUEST_HANDLE(void) arg) #endif /* !COMPAT */ -static int xenoprof_op_get_buffer(XEN_GUEST_HANDLE(void) arg) +static int xenoprof_op_get_buffer(XEN_GUEST_HANDLE_PARAM(void) arg) { struct xenoprof_get_buffer xenoprof_get_buffer; struct domain *d = current->domain; @@ -662,7 +662,7 @@ static int xenoprof_op_get_buffer(XEN_GUEST_HANDLE(void) arg) || (op == XENOPROF_disable_virq) \ || (op == XENOPROF_get_buffer)) -ret_t do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg) +ret_t do_xenoprof_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg) { int ret = 0; |