Skip to content

Commit

Permalink
s390x/pci: bypass vfio DMA counting when using cdev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rosatomj authored and huth committed Nov 13, 2023
1 parent 34aee9c commit 0ab3565
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hw/s390x/s390-pci-vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 0ab3565

Please sign in to comment.