crosvm/riscv64
Jakob Vukalovic 138ecc7e67 crosvm: Filter VFIO devices in DT overlays
This change uses the overlay filtering mechanism to only apply nodes
pertaining to the VFIO devices given to crosvm.

For each VFIO device, define its device tree symbol by passing a
`dt-symbol` option in addition to the sysfs path. The DT symbol must
match the label of the device node in the FDT. In addition, specify
which device tree files will be filtered using these symbols by passing
a `filter` option in addition to the device tree overlay path.

As the device nodes are applied to the base FDT, update the `reg` and
`interrupts` properties with correct values for each VFIO device.
Since these values are allocated by crosvm, they are not known ahead of
time and even if written to the overlay file, are unlikely to be
correct. This change will set the correct values for each VFIO device.

Bug: b/296796644
Test: tools/run_tests
Change-Id: I1ca38b5ef223e551b91a831093b9ae790962aa5b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4855969
Commit-Queue: Jakob Vukalović <jakobvukalovic@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-11-13 20:29:48 +00:00
..
src crosvm: Filter VFIO devices in DT overlays 2023-11-13 20:29:48 +00:00
Cargo.toml Replace #[cfg(unix)] with #[cfg(any(target_os = "android", target_os = "linux"))] 2023-10-11 00:43:29 +00:00