From patchwork Mon Oct 1 18:41:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: vfio_pci: fix build on 32-bit systems Date: Mon, 01 Oct 2012 08:41:51 -0000 From: Anthony Liguori X-Patchwork-Id: 188331 Message-Id: <1349116911-18550-1-git-send-email-aliguori@us.ibm.com> To: qemu-devel@nongnu.org Cc: Anthony Liguori , Alex Barcelo , Alex Williamson We cannot cast directly from pointer to uint64. Cc: Alex Williamson Cc: Alex Barcelo Reported-by: Alex Barcelo Signed-off-by: Anthony Liguori Acked-by: Alex Williamson --- hw/vfio_pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index a24558a..a1eeced 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -768,7 +768,7 @@ static int vfio_dma_map(VFIOContainer *container, target_phys_addr_t iova, struct vfio_iommu_type1_dma_map map = { .argsz = sizeof(map), .flags = VFIO_DMA_MAP_FLAG_READ, - .vaddr = (__u64)vaddr, + .vaddr = (__u64)(intptr_t)vaddr, .iova = iova, .size = size, };