mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
23bd5fc3ed
commit
2e8656710a
|
@ -353,7 +353,7 @@ static void hotplug_event_notify(PCIDevice *dev)
|
||||||
msix_notify(dev, pcie_cap_flags_get_vector(dev));
|
msix_notify(dev, pcie_cap_flags_get_vector(dev));
|
||||||
} else if (msi_enabled(dev)) {
|
} else if (msi_enabled(dev)) {
|
||||||
msi_notify(dev, pcie_cap_flags_get_vector(dev));
|
msi_notify(dev, pcie_cap_flags_get_vector(dev));
|
||||||
} else {
|
} else if (pci_intx(dev) != -1) {
|
||||||
pci_set_irq(dev, dev->exp.hpev_notified);
|
pci_set_irq(dev, dev->exp.hpev_notified);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -361,7 +361,8 @@ static void hotplug_event_notify(PCIDevice *dev)
|
||||||
static void hotplug_event_clear(PCIDevice *dev)
|
static void hotplug_event_clear(PCIDevice *dev)
|
||||||
{
|
{
|
||||||
hotplug_event_update_event_status(dev);
|
hotplug_event_update_event_status(dev);
|
||||||
if (!msix_enabled(dev) && !msi_enabled(dev) && !dev->exp.hpev_notified) {
|
if (!msix_enabled(dev) && !msi_enabled(dev) && pci_intx(dev) != -1 &&
|
||||||
|
!dev->exp.hpev_notified) {
|
||||||
pci_irq_deassert(dev);
|
pci_irq_deassert(dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,7 +290,7 @@ static void pcie_aer_root_notify(PCIDevice *dev)
|
||||||
msix_notify(dev, pcie_aer_root_get_vector(dev));
|
msix_notify(dev, pcie_aer_root_get_vector(dev));
|
||||||
} else if (msi_enabled(dev)) {
|
} else if (msi_enabled(dev)) {
|
||||||
msi_notify(dev, pcie_aer_root_get_vector(dev));
|
msi_notify(dev, pcie_aer_root_get_vector(dev));
|
||||||
} else {
|
} else if (pci_intx(dev) != -1) {
|
||||||
pci_irq_assert(dev);
|
pci_irq_assert(dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue