diff options
Diffstat (limited to 'hw/vfio/common.c')
-rw-r--r-- | hw/vfio/common.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 080046e..2b1f78f 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -397,7 +397,7 @@ static int vfio_dma_unmap_bitmap(VFIOContainer *container, { struct vfio_iommu_type1_dma_unmap *unmap; struct vfio_bitmap *bitmap; - uint64_t pages = REAL_HOST_PAGE_ALIGN(size) / qemu_real_host_page_size; + uint64_t pages = REAL_HOST_PAGE_ALIGN(size) / qemu_real_host_page_size(); int ret; unmap = g_malloc0(sizeof(*unmap) + sizeof(*bitmap)); @@ -414,7 +414,7 @@ static int vfio_dma_unmap_bitmap(VFIOContainer *container, * to qemu_real_host_page_size. */ - bitmap->pgsize = qemu_real_host_page_size; + bitmap->pgsize = qemu_real_host_page_size(); bitmap->size = ROUND_UP(pages, sizeof(__u64) * BITS_PER_BYTE) / BITS_PER_BYTE; @@ -882,8 +882,8 @@ static void vfio_listener_region_add(MemoryListener *listener, } if (unlikely((section->offset_within_address_space & - ~qemu_real_host_page_mask) != - (section->offset_within_region & ~qemu_real_host_page_mask))) { + ~qemu_real_host_page_mask()) != + (section->offset_within_region & ~qemu_real_host_page_mask()))) { error_report("%s received unaligned region", __func__); return; } @@ -891,7 +891,7 @@ static void vfio_listener_region_add(MemoryListener *listener, iova = REAL_HOST_PAGE_ALIGN(section->offset_within_address_space); llend = int128_make64(section->offset_within_address_space); llend = int128_add(llend, section->size); - llend = int128_and(llend, int128_exts64(qemu_real_host_page_mask)); + llend = int128_and(llend, int128_exts64(qemu_real_host_page_mask())); if (int128_ge(int128_make64(iova), llend)) { if (memory_region_is_ram_device(section->mr)) { @@ -899,7 +899,7 @@ static void vfio_listener_region_add(MemoryListener *listener, memory_region_name(section->mr), section->offset_within_address_space, int128_getlo(section->size), - qemu_real_host_page_size); + qemu_real_host_page_size()); } return; } @@ -1118,8 +1118,8 @@ static void vfio_listener_region_del(MemoryListener *listener, } if (unlikely((section->offset_within_address_space & - ~qemu_real_host_page_mask) != - (section->offset_within_region & ~qemu_real_host_page_mask))) { + ~qemu_real_host_page_mask()) != + (section->offset_within_region & ~qemu_real_host_page_mask()))) { error_report("%s received unaligned region", __func__); return; } @@ -1150,7 +1150,7 @@ static void vfio_listener_region_del(MemoryListener *listener, iova = REAL_HOST_PAGE_ALIGN(section->offset_within_address_space); llend = int128_make64(section->offset_within_address_space); llend = int128_add(llend, section->size); - llend = int128_and(llend, int128_exts64(qemu_real_host_page_mask)); + llend = int128_and(llend, int128_exts64(qemu_real_host_page_mask())); if (int128_ge(int128_make64(iova), llend)) { return; @@ -1272,9 +1272,9 @@ static int vfio_get_dirty_bitmap(VFIOContainer *container, uint64_t iova, * qemu_real_host_page_size to mark those dirty. Hence set bitmap's pgsize * to qemu_real_host_page_size. */ - range->bitmap.pgsize = qemu_real_host_page_size; + range->bitmap.pgsize = qemu_real_host_page_size(); - pages = REAL_HOST_PAGE_ALIGN(range->size) / qemu_real_host_page_size; + pages = REAL_HOST_PAGE_ALIGN(range->size) / qemu_real_host_page_size(); range->bitmap.size = ROUND_UP(pages, sizeof(__u64) * BITS_PER_BYTE) / BITS_PER_BYTE; range->bitmap.data = g_try_malloc0(range->bitmap.size); @@ -1970,7 +1970,7 @@ static void vfio_get_iommu_info_migration(VFIOContainer *container, * cpu_physical_memory_set_dirty_lebitmap() supports pages in bitmap of * qemu_real_host_page_size to mark those dirty. */ - if (cap_mig->pgsize_bitmap & qemu_real_host_page_size) { + if (cap_mig->pgsize_bitmap & qemu_real_host_page_size()) { container->dirty_pages_supported = true; container->max_dirty_bitmap_size = cap_mig->max_dirty_bitmap_size; container->dirty_pgsizes = cap_mig->pgsize_bitmap; |