vmm: Reorganize DeviceManager creation

This commit performs the split of the DeviceManager's creation into two
separate functions by moving anything related to device's creation after
the DeviceManager structure has been initialized.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-04-28 19:57:28 +02:00
parent 89c2a5868c
commit d39f91de02
2 changed files with 98 additions and 82 deletions

View File

@@ -334,6 +334,12 @@ impl Vm {
)
.map_err(Error::DeviceManager)?;
device_manager
.lock()
.unwrap()
.create_devices()
.map_err(Error::DeviceManager)?;
let cpu_manager = cpu::CpuManager::new(
&config.lock().unwrap().cpus.clone(),
&device_manager,