From 31bde4f5dadaf5201c680dc6cae03a3e44dd663c Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 6 May 2020 10:25:48 +0100 Subject: [PATCH] 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 --- vmm/src/vm.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index ed8704c87..7a4068a38 100755 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -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()