[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/8] s390x/pci: MSI-X isn't strictly required for passthrough
From: |
Matthew Rosato |
Subject: |
[PATCH 3/8] s390x/pci: MSI-X isn't strictly required for passthrough |
Date: |
Tue, 19 Jan 2021 15:44:14 -0500 |
s390 PCI currently disallows PCI devices without the MSI-X capability.
However, this fence doesn't make sense for passthrough devices. Move
the check to only fence emulated devices (e.g., virtio).
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
---
hw/s390x/s390-pci-bus.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index dd138da..dc732e2 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -1028,12 +1028,12 @@ static void s390_pcihost_plug(HotplugHandler
*hotplug_dev, DeviceState *dev,
s390_pci_get_clp_info(pbdev);
} else {
pbdev->fh |= FH_SHM_EMUL;
- }
- if (s390_pci_msix_init(pbdev)) {
- error_setg(errp, "MSI-X support is mandatory "
- "in the S390 architecture");
- return;
+ if (s390_pci_msix_init(pbdev)) {
+ error_setg(errp, "MSI-X support is mandatory "
+ "in the S390 architecture");
+ return;
+ }
}
if (dev->hotplugged) {
@@ -1073,7 +1073,9 @@ static void s390_pcihost_unplug(HotplugHandler
*hotplug_dev, DeviceState *dev,
devfn = pci_dev->devfn;
qdev_unrealize(dev);
- s390_pci_msix_free(pbdev);
+ if (pbdev->fh & FH_SHM_EMUL) {
+ s390_pci_msix_free(pbdev);
+ }
s390_pci_iommu_free(s, bus, devfn);
pbdev->pdev = NULL;
pbdev->state = ZPCI_FS_RESERVED;
--
1.8.3.1
- [PATCH 0/8] s390x/pci: Fixing s390 vfio-pci ISM support, Matthew Rosato, 2021/01/19
- [PATCH 3/8] s390x/pci: MSI-X isn't strictly required for passthrough,
Matthew Rosato <=
- [PATCH 1/8] linux-headers: update against 5.11-rc4, Matthew Rosato, 2021/01/19
- [PATCH 4/8] s390x/pci: Introduce the ZpciOps structure, Matthew Rosato, 2021/01/19
- [PATCH 5/8] s390x/pci: Handle devices that support relaxed alignment, Matthew Rosato, 2021/01/19
- [PATCH 6/8] s390x/pci: PCISTB via the vfio zPCI I/O region, Matthew Rosato, 2021/01/19
- [PATCH 7/8] s390x/pci: PCILG via the vfio zPCI I/O region, Matthew Rosato, 2021/01/19
- [PATCH 2/8] s390x/pci: Keep track of the PCI Function type, Matthew Rosato, 2021/01/19
- [PATCH 8/8] s390x/pci: Prevent ISM device passthrough on older host kernels, Matthew Rosato, 2021/01/19
- Re: [PATCH 0/8] s390x/pci: Fixing s390 vfio-pci ISM support, Pierre Morel, 2021/01/20