mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Break the cyclic dependency between DeviceManager and IO bus
By inserting the DeviceManager on the IO bus, we introduced some cyclic
dependency:
DeviceManager ---> AddressManager ---> Bus ---> BusDevice
^ |
| |
+---------------------------------------------+
This cycle needs to be broken by inserting a Weak reference instead of
an Arc (considered as a strong reference).
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
c1af13efeb
commit
d47f733e51
+1
-1
@@ -507,7 +507,7 @@ impl CpuManager {
|
||||
let cpu_manager = Arc::new(Mutex::new(CpuManager {
|
||||
boot_vcpus,
|
||||
max_vcpus,
|
||||
io_bus: Arc::downgrade(&device_manager.io_bus().clone()),
|
||||
io_bus: Arc::downgrade(&device_manager.io_bus()),
|
||||
mmio_bus: device_manager.mmio_bus().clone(),
|
||||
ioapic: device_manager.ioapic().clone(),
|
||||
vm_memory: guest_memory,
|
||||
|
||||
Reference in New Issue
Block a user