[PATCH v2 1/4] PCI: handle PCI->PCIe bridges as well in alloc_pdev()

Jan Beulich posted 4 patches 6 days, 16 hours ago
[PATCH v2 1/4] PCI: handle PCI->PCIe bridges as well in alloc_pdev()
Posted by Jan Beulich 6 days, 16 hours ago
It's not clear why the enumerator was omitted, as these clearly shouldn't
take the "default" path (issuing a warning). Handle them the same as
legacy and PCIe->PCI bridges.

Fixes: e7e08d86ad2f ("IOMMU/PCI: consolidate pdev_type() and cache its result for a given device")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: New.

--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -351,6 +351,7 @@ static struct pci_dev *alloc_pdev(struct
         unsigned long flags;
 
         case DEV_TYPE_PCIe2PCI_BRIDGE:
+        case DEV_TYPE_PCI2PCIe_BRIDGE:
         case DEV_TYPE_LEGACY_PCI_BRIDGE:
             sec_bus = pci_conf_read8(pdev->sbdf, PCI_SECONDARY_BUS);
             sub_bus = pci_conf_read8(pdev->sbdf, PCI_SUBORDINATE_BUS);
Re: [PATCH v2 1/4] PCI: handle PCI->PCIe bridges as well in alloc_pdev()
Posted by Stewart Hildebrand 6 days, 9 hours ago
On 1/19/26 09:46, Jan Beulich wrote:
> It's not clear why the enumerator was omitted, as these clearly shouldn't
> take the "default" path (issuing a warning). Handle them the same as
> legacy and PCIe->PCI bridges.
> 
> Fixes: e7e08d86ad2f ("IOMMU/PCI: consolidate pdev_type() and cache its result for a given device")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>