crosvm/arch/src
Haiwei Li e35d46529c devices: vfio_pci: MMIO BAR allocation for devices on non-root buses
Since we'll be putting all PCI devices on non-root buses behind virtual
PCI-E root ports, MMIO BARs in such devices must be inside the forward
windows of their root ports. This presents additional requirements for
their MMIO BAR allocation:

1. All non-prefetchable BARs must be inside the same 32-bit MMIO window
2. All prefetchable BARs must be inside the same MMIO window, but
   different than the non-prefetchable MMIO window
3. Both windows must be 1MB-aligned
4. No other PCI devices should occupy MMIO space in these windows

Allocate the entire window from the system resource allocator to prevent
any space within the window from being used elsewhere. To maximize
memory space efficiency, use VfioResourceAllocator for BAR allocation.

BUG=b:185084350
TEST=passthrough a vfio-pci device with bus_number > 0 and static connet it
behind a pcie root port, then check pcie RP and vfio-pci device function in
guest.

Change-Id: Ic9865afc48eb3ff9fa475dbcfdf90642b012980c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3166888
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-02-28 21:55:09 +00:00
..
android.rs
fdt.rs crosvm: fix needless_borrow clippy warning 2021-08-25 23:02:23 +00:00
lib.rs devices: vfio_pci: MMIO BAR allocation for devices on non-root buses 2022-02-28 21:55:09 +00:00
pstore.rs Revert "vm_memory: Add from_desciptor() in MemoryMappingBuilder" 2021-09-27 16:36:24 +00:00
serial.rs Update to the latest pKVM ABI. 2022-01-04 19:35:27 +00:00