cloud-hypervisor/vm-device
Yuanchu Xie 954f3dd057 vm-device: generalize BusDevice to use a shared reference
BusDevice trait functions currently holds a mutable reference to self,
and exclusive access is guaranteed by taking a Mutex when dispatched by
the Bus object. However, this prevents individual devices from serving
accesses that do not require an mutable reference or is better served
with different synchronization primitives. We switch Bus to dispatch via
BusDeviceSync, which holds a shared reference, and delegate locking to
the BusDeviceSync trait implementation for Mutex<BusDevice>.

Other changes are made to make use of the dyn BusDeviceSync
trait object.

Signed-off-by: Yuanchu Xie <yuanchu@google.com>
2024-08-05 22:41:56 +00:00
..
src vm-device: generalize BusDevice to use a shared reference 2024-08-05 22:41:56 +00:00
Cargo.toml build: Bump anyhow from 1.0.81 to 1.0.86 2024-07-26 00:25:08 +00:00