vmm: Call DeviceManager's register_devices() on creation

Rather than calling it at the very start of the VM execution (i.e. when
the VCPUs are created) do it as part of the DeviceManager creation.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2019-09-10 17:48:21 +01:00
committed by Samuel Ortiz
parent 7edc46f492
commit 05b5115e67
2 changed files with 7 additions and 7 deletions
-4
View File
@@ -936,10 +936,6 @@ impl<'a> Vm<'a> {
}
pub fn start(&mut self, entry_addr: GuestAddress) -> Result<ExitBehaviour> {
self.devices
.register_devices()
.map_err(Error::DeviceManager)?;
let vcpu_count = u8::from(&self.config.cpus);
// let vcpus: Vec<thread::JoinHandle<()>> = Vec::with_capacity(vcpu_count as usize);