From: Ilpo Järvinen <[email protected]> Sent: Monday, November 16, 2026 7:24 AM > > The pci-hyperv driver scans the bus and assigns resources using > pci_bus_assign_resources(). That function makes bridge window sizing > disjoint from the assignment phase and is going to be removed. > > Convert pci_bus_assign_resources() to > pci_assign_unassigned_bus_resources(). If no other bridges are involved, > the extra sizing should be no-op.
I tested this series on an x86 VM in the Azure public cloud that has 5 NVMe devices and a Mellanox VF NIC. All 6 devices are PCI pass-thru devices in the VM that are initially set up using the pci-hyperv.c driver, so each device has its own root bus and bridge. No issues were seen in a basic smoke test. I added some debug code to pci_assign_unassigned_bus_resources(), and indeed the "for_each_pci_bridge()" loop found nothing as each device was setup. So __pci_bus_assign_resources() was called with an empty add_list, and as expected, the new execution path is equivalent to the old pci_bus_assign_resources() call. Question: Your cover letter says drivers that call pci_assign_resources() directly are not covered by this series. pci-hyperv.c *does* call pci_assign_resources() directly in hv_pci_allocate_bridge_windows(). Is that a problem? I don't understand all the details of the PCI resource assignment well enough to judge for myself. :-( In any case, Tested-by: Michael Kelley <[email protected]> And at least to some degree, Reviewed-by: Michael Kelley <[email protected]> > > Signed-off-by: Ilpo Järvinen <[email protected]> > --- > drivers/pci/controller/pci-hyperv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/pci-hyperv.c > b/drivers/pci/controller/pci-hyperv.c > index 824cf27e85e6..8eff3e9b325f 100644 > --- a/drivers/pci/controller/pci-hyperv.c > +++ b/drivers/pci/controller/pci-hyperv.c > @@ -2549,7 +2549,7 @@ static int create_root_hv_pci_bus(struct > hv_pcibus_device *hbus) > > pci_lock_rescan_remove(); > hv_pci_assign_numa_node(hbus); > - pci_bus_assign_resources(bridge->bus); > + pci_assign_unassigned_bus_resources(bridge->bus); > hv_pci_assign_slots(hbus); > pci_bus_add_devices(bridge->bus); > pci_unlock_rescan_remove(); > -- > 2.47.3 >
