mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +00:00
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:
parent
cd60de8f7f
commit
91a4a2581e
@ -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)?,
|
||||
|
Loading…
x
Reference in New Issue
Block a user