hw/s390x/vfio: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()
Get the target page bits at runtime. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20260313062055.2188-4-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Mar 13, 2026 at 06:34 UTC
0d05d9365c04da3776c630064439c7c0f2723eda
1 file changed
+2
-1
hw/s390x/s390-pci-vfio.c
+2
-1
@@ -22,6 +22,7 @@
22
#include "hw/vfio/pci.h"
23
#include "hw/vfio/vfio-container-legacy.h"
24
#include "hw/vfio/vfio-helpers.h"
25
+#include "exec/target_page.h"
26
27
/*
28
* Get the current DMA available count from vfio. Returns true if vfio is
@@ -150,7 +151,7 @@ static void s390_pci_read_base(S390PCIBusDevice *pbdev,
151
* to request that the guest free DMA mappings as necessary.
152
*/
153
if (!pbdev->rtr_avail) {
153
- vfio_size = pbdev->iommu->max_dma_limit << TARGET_PAGE_BITS;
154
+ vfio_size = pbdev->iommu->max_dma_limit << qemu_target_page_bits();
155
if (vfio_size > 0 && vfio_size < cap->end_dma - cap->start_dma + 1) {
156
pbdev->zpci_fn.edma = cap->start_dma + vfio_size - 1;
157
}