vmm: Unpark the DeviceManager threads in shutdown

To ensure that the DeviceManager threads (such as those used for virtio
devices) are cleaned up it is necessary to unpark them so that they get
cleanly terminated as part of the shutdown.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-05-06 10:25:48 +01:00 committed by Sebastien Boeuf
parent 801e72ac6d
commit 31bde4f5da

View File

@ -608,6 +608,13 @@ impl Vm {
signals.close();
}
// Wake up the DeviceManager threads so they will get terminated cleanly
self.device_manager
.lock()
.unwrap()
.resume()
.map_err(Error::Resume)?;
self.cpu_manager
.lock()
.unwrap()