aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorMatthew Rosato <mjrosato@linux.ibm.com>2023-11-10 12:51:07 -0500
committerThomas Huth <thuth@redhat.com>2023-11-13 11:35:47 +0100
commit0ab35658401a2e0a411ce0d1836a4f509bde717a (patch)
tree01fe216872fb452b00d4e4926712f381d7868480 /hw/s390x
parent34aee9c94691f529cd952f9483a6b357ca098042 (diff)
downloadqemu-0ab35658401a2e0a411ce0d1836a4f509bde717a.zip
qemu-0ab35658401a2e0a411ce0d1836a4f509bde717a.tar.gz
qemu-0ab35658401a2e0a411ce0d1836a4f509bde717a.tar.bz2
s390x/pci: bypass vfio DMA counting when using cdev
The current code assumes that there is always a vfio group, but that's no longer guaranteed with the iommufd backend when using cdev. In this case, we don't need to track the vfio dma limit anyway. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Message-ID: <20231110175108.465851-2-mjrosato@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/s390-pci-vfio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c
index 59a2e03..e28573b 100644
--- a/hw/s390x/s390-pci-vfio.c
+++ b/hw/s390x/s390-pci-vfio.c
@@ -66,6 +66,10 @@ S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s,
assert(vpdev);
+ if (!vpdev->vbasedev.group) {
+ return NULL;
+ }
+
id = vpdev->vbasedev.group->container->fd;
if (!s390_pci_update_dma_avail(id, &avail)) {