pcie: Don't try triggering a LSI when not defined
commit2e8656710a3ac6e79d54b18df9f74b30753448cd
authorFrederic Barrat <fbarrat@linux.ibm.com>
Fri, 8 Apr 2022 13:13:02 +0000 (8 15:13 +0200)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 20 Apr 2022 21:00:30 +0000 (20 18:00 -0300)
tree94be263453f8dc059aff26d01e32989fb57de2f4
parent23bd5fc3ed1a681eb4f1e1308bb2869fb7ca050f
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>
hw/pci/pcie.c
hw/pci/pcie_aer.c