crosvm/devices/src
Xiong Zhang 3022a234b0 devices: Use Mutex to protect bus->devices
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>
2021-10-21 05:42:49 +00:00
..
irqchip devices: Use Mutex to protect bus->devices 2021-10-21 05:42:49 +00:00
pci devices: Use Mutex to protect bus->devices 2021-10-21 05:42:49 +00:00
platform Uprev to rust 1.55.0 2021-10-19 19:12:52 +00:00
register_space devices/register_space: use Copy rather than Clone 2021-08-25 23:02:28 +00:00
usb devices: convert to ThisError and sort 2021-09-02 21:00:20 +00:00
utils devices: convert to ThisError and sort 2021-09-02 21:00:20 +00:00
virtio Use a shared buffer for virtio-console data 2021-10-20 22:17:21 +00:00
acpi.rs
bat.rs devices: convert to ThisError and sort 2021-09-02 21:00:20 +00:00
bus.rs devices: Use Mutex to protect bus->devices 2021-10-21 05:42:49 +00:00
cmos.rs
direct_io.rs
direct_irq.rs devices: convert to ThisError and sort 2021-09-02 21:00:20 +00:00
i8042.rs
lib.rs devices: vfio: Add VFIO platform support 2021-10-04 17:06:19 +00:00
pit.rs devices: convert to ThisError and sort 2021-09-02 21:00:20 +00:00
pl030.rs
proxy.rs devices: convert to ThisError and sort 2021-09-02 21:00:20 +00:00
serial.rs
serial_device.rs arch, devices: Move serial data structures to devices 2021-08-18 09:06:23 +00:00
vfio.rs devices: vfio: Use Result<> alias 2021-10-20 12:04:59 +00:00