aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-10-01 13:40:15 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-10-01 13:40:15 -0500
commit0f41dc182c7e4e2ae160641552101a2a199f7c4c (patch)
tree3d71422cb90d9cb3f5ab0e97c2eb82f846edc0e4
parent92e1fb5ed1a26d09ee754845d5691d473410c1dc (diff)
downloadvirtio-rng-0f41dc182c7e4e2ae160641552101a2a199f7c4c.tar.gz
vfio_pci: fix build on 32-bit systems
We cannot cast directly from pointer to uint64. Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Alex Barcelo <abarcelo@ac.upc.edu> Reported-by: Alex Barcelo <abarcelo@ac.upc.edu> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/vfio_pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c
index a24558aaa0f..a1eeced8fde 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,
};