summary refs log tree commit diff stats
path: root/hw/pci/pcie_aer.c
diff options
context:
space:
mode:
authorFrederic Barrat <fbarrat@linux.ibm.com>2022-04-08 15:13:02 +0200
committerDaniel Henrique Barboza <danielhb413@gmail.com>2022-04-20 18:00:30 -0300
commit2e8656710a3ac6e79d54b18df9f74b30753448cd (patch)
tree94be263453f8dc059aff26d01e32989fb57de2f4 /hw/pci/pcie_aer.c
parent23bd5fc3ed1a681eb4f1e1308bb2869fb7ca050f (diff)
downloadfocaccia-qemu-2e8656710a3ac6e79d54b18df9f74b30753448cd.tar.gz
focaccia-qemu-2e8656710a3ac6e79d54b18df9f74b30753448cd.zip
pcie: Don't try triggering a LSI when not defined
This patch skips [de]asserting a LSI interrupt if the device doesn't
have any LSI defined. Doing so would trigger an assert in
pci_irq_handler().

The PCIE root port implementation in qemu requests a LSI (INTA), but a
subclass may want to change that behavior since it's a valid
configuration. For example on the POWER8/POWER9/POWER10 systems, the
root bridge doesn't request any LSI.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20220408131303.147840-2-fbarrat@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'hw/pci/pcie_aer.c')
-rw-r--r--hw/pci/pcie_aer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c
index e1a8a88c8c..92bd0530dd 100644
--- a/hw/pci/pcie_aer.c
+++ b/hw/pci/pcie_aer.c
@@ -290,7 +290,7 @@ static void pcie_aer_root_notify(PCIDevice *dev)
         msix_notify(dev, pcie_aer_root_get_vector(dev));
     } else if (msi_enabled(dev)) {
         msi_notify(dev, pcie_aer_root_get_vector(dev));
-    } else {
+    } else if (pci_intx(dev) != -1) {
         pci_irq_assert(dev);
     }
 }