From 9bbb8d3577fe302802bfc7e4cf832a39aaa75692 Mon Sep 17 00:00:00 2001 From: Yuval Shaia Date: Thu, 22 Mar 2018 11:52:18 +0200 Subject: hw/rdma: Change host_virt to void * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To avoid compilation warnings on 32-bit machines: rdma_backend.c: In function 'rdma_backend_create_mr': rdma_backend.c:409:37: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] mr->ibmr = ibv_reg_mr(pd->ibpd, (void *)addr, length, access); Reported-by: Eric Blake Signed-off-by: Yuval Shaia Reviewed-by: Eric Blake Tested-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180322095220.9976-2-yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/rdma/rdma_backend.c') diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index 57f40d99a3..b1d2913b2c 100644 --- a/hw/rdma/rdma_backend.c +++ b/hw/rdma/rdma_backend.c @@ -222,7 +222,7 @@ static int build_host_sge_array(RdmaDeviceResources *rdma_dev_res, return VENDOR_ERR_INVLKEY | ssge[ssge_idx].lkey; } - dsge->addr = mr->user_mr.host_virt + ssge[ssge_idx].addr - + dsge->addr = (uintptr_t)mr->user_mr.host_virt + ssge[ssge_idx].addr - mr->user_mr.guest_start; dsge->length = ssge[ssge_idx].length; dsge->lkey = rdma_backend_mr_lkey(&mr->backend_mr); @@ -401,12 +401,12 @@ void rdma_backend_destroy_pd(RdmaBackendPD *pd) } } -int rdma_backend_create_mr(RdmaBackendMR *mr, RdmaBackendPD *pd, uint64_t addr, +int rdma_backend_create_mr(RdmaBackendMR *mr, RdmaBackendPD *pd, void *addr, size_t length, int access) { - pr_dbg("addr=0x%lx\n", addr); + pr_dbg("addr=0x%p\n", addr); pr_dbg("len=%ld\n", length); - mr->ibmr = ibv_reg_mr(pd->ibpd, (void *)addr, length, access); + mr->ibmr = ibv_reg_mr(pd->ibpd, addr, length, access); if (mr->ibmr) { pr_dbg("lkey=0x%x\n", mr->ibmr->lkey); pr_dbg("rkey=0x%x\n", mr->ibmr->rkey); -- cgit v1.2.3