This set adds a minimizing resource assignment algorithm. VMD domains frequently have issues with default hotplug settings and large arrays of drives such as those in JBOFs. This algorithm uses the default or user-specified hotplug resource settings, then tries with minimal settings using 256 for IO, and 1MB for MMIO and Prefetch, and finally tries without additional hotplug resources as if the bridge were not hotplug capable. This set allows a resource constrained domain to at the very least enumerate and attach drivers to devices, though may not result in supportable hotplug slot if a device is not already occupied in the slot. Jon Derrick (3): PCI: Create helper to release/restore bridge resources PCI: Introduce a minimizing assignment algorithm PCI: vmd: Wire up VMD for fallback resource assignment drivers/pci/controller/vmd.c | 2 +- drivers/pci/setup-bus.c | 147 ++++++++++++++++++++++++++++------- include/linux/pci.h | 2 + 3 files changed, 124 insertions(+), 27 deletions(-) -- 2.18.1