[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1 of 2] Fix types used in xc_memshr_* functions
tools/libxc/xc_memshr.c | 28 ++++++++++++++-------------- tools/libxc/xenctrl.h | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) Currently the memshr functions use uint32_t for the domid. This actually leads to a funny domid_t -> uint32_t -> domid_t sequence of casts. This patch updates the API functions to be domid_t in the first place. No tools need to be modified with this patch, the casts were implicit. Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx> Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> diff -r d5e830891ee2 -r 2d3804d81c3c tools/libxc/xc_memshr.c --- a/tools/libxc/xc_memshr.c +++ b/tools/libxc/xc_memshr.c @@ -26,7 +26,7 @@ #include <xen/grant_table.h> int xc_memshr_control(xc_interface *xch, - uint32_t domid, + domid_t domid, int enable) { DECLARE_DOMCTL; @@ -34,7 +34,7 @@ int xc_memshr_control(xc_interface *xch, domctl.cmd = XEN_DOMCTL_mem_sharing_op; domctl.interface_version = XEN_DOMCTL_INTERFACE_VERSION; - domctl.domain = (domid_t)domid; + domctl.domain = domid; op = &(domctl.u.mem_sharing_op); op->op = XEN_DOMCTL_MEM_EVENT_OP_SHARING_CONTROL; op->u.enable = enable; @@ -43,7 +43,7 @@ int xc_memshr_control(xc_interface *xch, } int xc_memshr_nominate_gfn(xc_interface *xch, - uint32_t domid, + domid_t domid, unsigned long gfn, uint64_t *handle) { @@ -53,7 +53,7 @@ int xc_memshr_nominate_gfn(xc_interface domctl.cmd = XEN_DOMCTL_mem_sharing_op; domctl.interface_version = XEN_DOMCTL_INTERFACE_VERSION; - domctl.domain = (domid_t)domid; + domctl.domain = domid; op = &(domctl.u.mem_sharing_op); op->op = XEN_DOMCTL_MEM_EVENT_OP_SHARING_NOMINATE_GFN; op->u.nominate.u.gfn = gfn; @@ -65,7 +65,7 @@ int xc_memshr_nominate_gfn(xc_interface } int xc_memshr_nominate_gref(xc_interface *xch, - uint32_t domid, + domid_t domid, grant_ref_t gref, uint64_t *handle) { @@ -75,7 +75,7 @@ int xc_memshr_nominate_gref(xc_interface domctl.cmd = XEN_DOMCTL_mem_sharing_op; domctl.interface_version = XEN_DOMCTL_INTERFACE_VERSION; - domctl.domain = (domid_t)domid; + domctl.domain = domid; op = &(domctl.u.mem_sharing_op); op->op = XEN_DOMCTL_MEM_EVENT_OP_SHARING_NOMINATE_GREF; op->u.nominate.u.grant_ref = gref; @@ -105,14 +105,14 @@ int xc_memshr_share(xc_interface *xch, } int xc_memshr_domain_resume(xc_interface *xch, - uint32_t domid) + domid_t domid) { DECLARE_DOMCTL; struct xen_domctl_mem_sharing_op *op; domctl.cmd = XEN_DOMCTL_mem_sharing_op; domctl.interface_version = XEN_DOMCTL_INTERFACE_VERSION; - domctl.domain = (domid_t)domid; + domctl.domain = domid; op = &(domctl.u.mem_sharing_op); op->op = XEN_DOMCTL_MEM_EVENT_OP_SHARING_RESUME; @@ -120,7 +120,7 @@ int xc_memshr_domain_resume(xc_interface } int xc_memshr_debug_gfn(xc_interface *xch, - uint32_t domid, + domid_t domid, unsigned long gfn) { DECLARE_DOMCTL; @@ -128,7 +128,7 @@ int xc_memshr_debug_gfn(xc_interface *xc domctl.cmd = XEN_DOMCTL_mem_sharing_op; domctl.interface_version = XEN_DOMCTL_INTERFACE_VERSION; - domctl.domain = (domid_t)domid; + domctl.domain = domid; op = &(domctl.u.mem_sharing_op); op->op = XEN_DOMCTL_MEM_EVENT_OP_SHARING_DEBUG_GFN; op->u.debug.u.gfn = gfn; @@ -137,7 +137,7 @@ int xc_memshr_debug_gfn(xc_interface *xc } int xc_memshr_debug_mfn(xc_interface *xch, - uint32_t domid, + domid_t domid, unsigned long mfn) { DECLARE_DOMCTL; @@ -145,7 +145,7 @@ int xc_memshr_debug_mfn(xc_interface *xc domctl.cmd = XEN_DOMCTL_mem_sharing_op; domctl.interface_version = XEN_DOMCTL_INTERFACE_VERSION; - domctl.domain = (domid_t)domid; + domctl.domain = domid; op = &(domctl.u.mem_sharing_op); op->op = XEN_DOMCTL_MEM_EVENT_OP_SHARING_DEBUG_MFN; op->u.debug.u.mfn = mfn; @@ -154,7 +154,7 @@ int xc_memshr_debug_mfn(xc_interface *xc } int xc_memshr_debug_gref(xc_interface *xch, - uint32_t domid, + domid_t domid, grant_ref_t gref) { DECLARE_DOMCTL; @@ -162,7 +162,7 @@ int xc_memshr_debug_gref(xc_interface *x domctl.cmd = XEN_DOMCTL_mem_sharing_op; domctl.interface_version = XEN_DOMCTL_INTERFACE_VERSION; - domctl.domain = (domid_t)domid; + domctl.domain = domid; op = &(domctl.u.mem_sharing_op); op->op = XEN_DOMCTL_MEM_EVENT_OP_SHARING_DEBUG_GREF; op->u.debug.u.gref = gref; diff -r d5e830891ee2 -r 2d3804d81c3c tools/libxc/xenctrl.h --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -1880,29 +1880,29 @@ int xc_mem_access_resume(xc_interface *x * memshr operations */ int xc_memshr_control(xc_interface *xch, - uint32_t domid, + domid_t domid, int enable); int xc_memshr_nominate_gfn(xc_interface *xch, - uint32_t domid, + domid_t domid, unsigned long gfn, uint64_t *handle); int xc_memshr_nominate_gref(xc_interface *xch, - uint32_t domid, + domid_t domid, grant_ref_t gref, uint64_t *handle); int xc_memshr_share(xc_interface *xch, uint64_t source_handle, uint64_t client_handle); int xc_memshr_domain_resume(xc_interface *xch, - uint32_t domid); + domid_t domid); int xc_memshr_debug_gfn(xc_interface *xch, - uint32_t domid, + domid_t domid, unsigned long gfn); int xc_memshr_debug_mfn(xc_interface *xch, - uint32_t domid, + domid_t domid, unsigned long mfn); int xc_memshr_debug_gref(xc_interface *xch, - uint32_t domid, + domid_t domid, grant_ref_t gref); int xc_flask_load(xc_interface *xc_handle, char *buf, uint32_t size); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |