vmm: cpu: When coming out of the pause event check for a kill signal

Rather than immediately entering the vCPU run() code check if the kill
signal is set. This allows paused VMs to be shutdown.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-05-06 09:59:46 +01:00 committed by Sebastien Boeuf
parent cd60de8f7f
commit 91a4a2581e

View File

@ -873,6 +873,13 @@ impl CpuManager {
while vcpu_pause_signalled.load(Ordering::SeqCst) {
thread::park();
}
// We've been told to terminate
if vcpu_kill_signalled.load(Ordering::SeqCst)
|| vcpu_kill.load(Ordering::SeqCst)
{
break;
}
}
})
.map_err(Error::VcpuSpawn)?,