[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/12] s390x/pci: bypass vfio DMA counting when using cdev
|
From: |
Thomas Huth |
|
Subject: |
[PULL 02/12] s390x/pci: bypass vfio DMA counting when using cdev |
|
Date: |
Mon, 13 Nov 2023 12:07:30 +0100 |
From: Matthew Rosato <mjrosato@linux.ibm.com>
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>
---
hw/s390x/s390-pci-vfio.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c
index 59a2e03873..e28573b593 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)) {
--
2.41.0
- [PULL 00/12] Misc patches for 8.2-rc0, Thomas Huth, 2023/11/13
- [PULL 01/12] host/include/generic/host/atomic128: Fix compilation problem with Clang 17, Thomas Huth, 2023/11/13
- [PULL 02/12] s390x/pci: bypass vfio DMA counting when using cdev,
Thomas Huth <=
- [PULL 03/12] s390x/pci: only limit DMA aperture if vfio DMA limit reported, Thomas Huth, 2023/11/13
- [PULL 04/12] MAINTAINERS: Add include/hw/input/pl050.h to the PrimeCell/CMSDK section, Thomas Huth, 2023/11/13
- [PULL 05/12] MAINTAINERS: Add hw/input/ads7846.c to the PXA2XX section, Thomas Huth, 2023/11/13
- [PULL 06/12] MAINTAINERS: Add hw/display/sii9022.c to the Versatile Express section, Thomas Huth, 2023/11/13
- [PULL 07/12] MAINTAINERS: Extend the Stellaris section, Thomas Huth, 2023/11/13
- [PULL 08/12] MAINTAINERS: Add a general architecture section for x86, Thomas Huth, 2023/11/13
- [PULL 09/12] tests/vm/netbsd: Use Python v3.11, Thomas Huth, 2023/11/13
- [PULL 11/12] tests/tsan: Rename the file with the entries that should be ignored, Thomas Huth, 2023/11/13
- [PULL 10/12] test-resv-mem: Fix CID 1523911, Thomas Huth, 2023/11/13
- [PULL 12/12] hw/audio/es1370: Clean up comment, Thomas Huth, 2023/11/13