crosvm/resources
Daniel Verkamp ef084fa680 resources: use PCI functions if devices are exhausted
When allocating PCI addresses, prefer to allocate at the device
granularity (e.g. 00:01.0, 00:02.0, 00:03.0, etc.), but when these are
all allocated, start using functions (e.g. 00:01.1, 00:01.2, 00:01.3).
This enables us to add more PCI devices (31 x 8 instead of just 31)
while maintaining the existing PCI address allocation order for setups
that do not require many devices.

BUG=b:210795995
TEST=boot Linux with 32+ virtio-pci devices

Change-Id: Ic06d3c9939dd78061a51e49b4f7ec457c81c7621
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3343182
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-01-20 19:40:09 +00:00
..
src resources: use PCI functions if devices are exhausted 2022-01-20 19:40:09 +00:00
Cargo.toml Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00