From: Frederic Barrat <fbarrat@linux.ibm.com>
To: clg@kaod.org, mst@redhat.com, marcel.apfelbaum@gmail.com,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH 3/3] pcie_aer: Don't trigger a LSI if none are defined
Date: Tue, 16 Nov 2021 18:01:33 +0100 [thread overview]
Message-ID: <20211116170133.724751-4-fbarrat@linux.ibm.com> (raw)
In-Reply-To: <20211116170133.724751-1-fbarrat@linux.ibm.com>
Skip triggering an LSI when the AER root error status is updated if no
LSI is defined for the device. We can have a root bridge with no LSI,
MSI and MSI-X defined, for example on POWER systems.
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
---
hw/pci/pcie_aer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c
index 27f9cc56af..e1a8a88c8c 100644
--- a/hw/pci/pcie_aer.c
+++ b/hw/pci/pcie_aer.c
@@ -774,7 +774,9 @@ void pcie_aer_root_write_config(PCIDevice *dev,
uint32_t root_cmd = pci_get_long(aer_cap + PCI_ERR_ROOT_COMMAND);
/* 6.2.4.1.2 Interrupt Generation */
if (!msix_enabled(dev) && !msi_enabled(dev)) {
- pci_set_irq(dev, !!(root_cmd & enabled_cmd));
+ if (pci_intx(dev) != -1) {
+ pci_set_irq(dev, !!(root_cmd & enabled_cmd));
+ }
return;
}
--
2.33.1
next prev parent reply other threads:[~2021-11-16 17:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 17:01 [PATCH 0/3] Fix irq allocation of PCI host bridge on powernv Frederic Barrat
2021-11-16 17:01 ` [PATCH 1/3] ppc/pnv: Tune the POWER9 PCIe Host bridge model Frederic Barrat
2021-11-18 14:45 ` Cédric Le Goater
2021-11-26 9:09 ` Cédric Le Goater
2021-11-26 17:08 ` Cédric Le Goater
2021-11-28 21:51 ` Michael S. Tsirkin
2021-11-29 14:40 ` Frederic Barrat
2021-11-16 17:01 ` [PATCH 2/3] pci: Export the pci_intx() function Frederic Barrat
2021-11-18 14:45 ` Cédric Le Goater
2021-11-16 17:01 ` Frederic Barrat [this message]
2021-11-18 14:46 ` [PATCH 3/3] pcie_aer: Don't trigger a LSI if none are defined Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211116170133.724751-4-fbarrat@linux.ibm.com \
--to=fbarrat@linux.ibm.com \
--cc=clg@kaod.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).