vmm: Add virtio-console to the list of Migratable devices

The virtio-console was not added to the list of Migratable devices,
which is fixed from this patch.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2020-04-28 14:53:05 +02:00 committed by Rob Bradford
parent 9ab4bb1ae2
commit aaba6e777f

View File

@ -1114,11 +1114,15 @@ impl DeviceManager {
let (virtio_console_device, console_input) =
vm_virtio::Console::new(id.clone(), writer, col, row, console_config.iommu)
.map_err(DeviceManagerError::CreateVirtioConsole)?;
let virtio_console_device = Arc::new(Mutex::new(virtio_console_device));
virtio_devices.push((
Arc::new(Mutex::new(virtio_console_device)) as VirtioDeviceArc,
Arc::clone(&virtio_console_device) as VirtioDeviceArc,
console_config.iommu,
id,
));
self.add_migratable_device(virtio_console_device as Arc<Mutex<dyn Migratable>>);
Some(console_input)
} else {
None