From: Anthony Liguori Date: Mon, 1 Oct 2012 18:40:15 +0000 (-0500) Subject: vfio_pci: fix build on 32-bit systems X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0f41dc182c7e4e2ae160641552101a2a199f7c4c;p=qemu.git vfio_pci: fix build on 32-bit systems We cannot cast directly from pointer to uint64. Cc: Alex Williamson Cc: Alex Barcelo Reported-by: Alex Barcelo Signed-off-by: Anthony Liguori --- diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index a24558aaa0..a1eeced8fd 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, };