vmm: cpu: Clear the "kill" flag on vCPU to support reuse

After the vCPU has been ejected and the thread shutdown it is useful to
clear the "kill" flag so that if the vCPU is reused it does not
immediately exit upon thread recreation.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-06-23 13:12:44 +01:00
parent b107bfcf2c
commit 9dcd0c37f3

View File

@ -900,6 +900,10 @@ impl CpuManager {
state.signal_thread();
state.join_thread()?;
state.handle = None;
// Once the thread has exited, clear the "kill" so that it can reused
state.kill.store(false, Ordering::SeqCst);
Ok(())
}