diff mbox series

[2/2] s390x/pci: add message for ISM without zPCI interpretation

Message ID 20250226210201.238489-3-mjrosato@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x/pci: changes to hotplug error handling | expand

Commit Message

Matthew Rosato Feb. 26, 2025, 9:02 p.m. UTC
Currently s390x does not support ISM passthrough without zPCI
interpretation.  This is already fenced, but the current message will
not provide adequate information to explain to the end-user why ISM
passthrough is not allowed.  Add a proper message.

Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
---
 hw/s390x/s390-pci-bus.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 6cc0e7538a..c41c88f88e 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -1147,6 +1147,12 @@  static void s390_pcihost_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
             pbdev->forwarding_assist = false;
         }
 
+        if (pbdev->pft == ZPCI_PFT_ISM && !pbdev->interp) {
+            error_setg(errp, "zPCI interpretation is required for ISM device "
+                       "passthrough");
+            goto pbdev_cleanup;
+        }
+
         if (s390_pci_msix_init(pbdev) && !pbdev->interp) {
             error_setg(errp, "MSI-X support is mandatory "
                        "in the S390 architecture");