mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
3022a234b0
With vfio pci device hotplug, bus->devices will be inserted and removed at runtime in different vcpu threads, so mutex should be used to protect it. Both each vcpu thread and pci_root share mmio_bus and io_bus, so use Arc for mmio_bus and io_bus. But pci_root is inserted into io_bus for pci cfg io, in order to resolve reference loop and memory leak, weak is used for pci_root.mmio_bus and pci_root.io_bus. BUG=b:174705596 TEST=boot a vm and check its function Change-Id: I7b3e63db76a90bc3873619b4d80a66db741ce78f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3184724 Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Chirantan Ekbote <chirantan@chromium.org> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
.build_test_serial | ||
Cargo.toml |