[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/45] hw/pci-bridge/pxb: Fix missing swizzle
From: |
Michael S. Tsirkin |
Subject: |
[PULL 26/45] hw/pci-bridge/pxb: Fix missing swizzle |
Date: |
Fri, 4 Mar 2022 08:40:32 -0500 |
From: Jonathan Cameron <jonathan.cameron@huawei.com>
pxb_map_irq_fn() handled the necessary removal of the swizzle
applied to the PXB interrupts by the bus to which it was attached
but neglected to apply the normal swizzle for PCI root ports
on the expander bridge.
Result of this was on ARM virt, the PME interrupts for a second
RP on a PXB instance were miss-routed to #45 rather than #46.
Tested with a selection of different configurations with 1 to 5
RP per PXB instance. Note on my x86 test setup the PME interrupts
are not triggered so I haven't been able to test this.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <20220118174855.19325-1-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/pci-bridge/pci_expander_bridge.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/pci-bridge/pci_expander_bridge.c
b/hw/pci-bridge/pci_expander_bridge.c
index 10e6e7c2ab..de932286b5 100644
--- a/hw/pci-bridge/pci_expander_bridge.c
+++ b/hw/pci-bridge/pci_expander_bridge.c
@@ -192,6 +192,12 @@ static int pxb_map_irq_fn(PCIDevice *pci_dev, int pin)
{
PCIDevice *pxb = pci_get_bus(pci_dev)->parent_dev;
+ /*
+ * First carry out normal swizzle to handle
+ * multple root ports on a pxb instance.
+ */
+ pin = pci_swizzle_map_irq_fn(pci_dev, pin);
+
/*
* The bios does not index the pxb slot number when
* it computes the IRQ because it resides on bus 0
--
MST
- Re: [PULL 16/45] tests/qtest/libqos: Add generic pci host bridge in arm-virt machine, (continued)
- [PULL 17/45] hw/virtio: vdpa: Fix leak of host-notifier memory-region, Michael S. Tsirkin, 2022/03/04
- [PULL 18/45] vhost-vdpa: make notifiers _init()/_uninit() symmetric, Michael S. Tsirkin, 2022/03/04
- [PULL 19/45] intel_iommu: support snoop control, Michael S. Tsirkin, 2022/03/04
- [PULL 20/45] hw/i386: Improve bounds checking in OVMF table parsing, Michael S. Tsirkin, 2022/03/04
- [PULL 21/45] hw/i386: Replace magic number with field length calculation, Michael S. Tsirkin, 2022/03/04
- [PULL 22/45] virtio-iommu: Default to bypass during boot, Michael S. Tsirkin, 2022/03/04
- [PULL 23/45] virtio-iommu: Support bypass domain, Michael S. Tsirkin, 2022/03/04
- [PULL 24/45] tests/qtest/virtio-iommu-test: Check bypass config, Michael S. Tsirkin, 2022/03/04
- [PULL 25/45] hw/i386/pc_piix: Mark the machine types from version 1.4 to 1.7 as deprecated, Michael S. Tsirkin, 2022/03/04
- [PULL 26/45] hw/pci-bridge/pxb: Fix missing swizzle,
Michael S. Tsirkin <=
- [PULL 27/45] virtio-net: Unlimit tx queue size if peer is vdpa, Michael S. Tsirkin, 2022/03/04
- [PULL 28/45] pcie: Add support for Single Root I/O Virtualization (SR/IOV), Michael S. Tsirkin, 2022/03/04
- [PULL 29/45] pcie: Add some SR/IOV API documentation in docs/pcie_sriov.txt, Michael S. Tsirkin, 2022/03/04
- [PULL 30/45] pcie: Add a helper to the SR/IOV API, Michael S. Tsirkin, 2022/03/04
- [PULL 31/45] pcie: Add 1.2 version token for the Power Management Capability, Michael S. Tsirkin, 2022/03/04
- [PULL 32/45] pci-bridge/xio3130_upstream: Fix error handling, Michael S. Tsirkin, 2022/03/04
- [PULL 33/45] pci-bridge/xio3130_downstream: Fix error handling, Michael S. Tsirkin, 2022/03/04
- [PULL 34/45] headers: Add pvpanic.h, Michael S. Tsirkin, 2022/03/04
- [PULL 35/45] hw/misc/pvpanic: Use standard headers instead, Michael S. Tsirkin, 2022/03/04
- [PULL 36/45] pci: show id info when pci BDF conflict, Michael S. Tsirkin, 2022/03/04