mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-26 22:45:23 +00:00
vmm: properly set vcpu state when thread exited
Once error occur, vcpu thread may exit, this should be critical event for the whole VM, we should fire exit event and set vcpu state. If we don't set vcpu state, the shutdown process will hang at signal_thread, which is waiting the vcpu state to change. Signed-off-by: Yong He <alexyonghe@tencent.com>
This commit is contained in:
parent
12abe2dd2b
commit
44d9c7fd42
@ -1035,12 +1035,16 @@ impl CpuManager {
|
||||
"VCPU generated error: {:?}",
|
||||
Error::UnexpectedVmExit
|
||||
);
|
||||
vcpu_run_interrupted.store(true, Ordering::SeqCst);
|
||||
exit_evt.write(1).unwrap();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
Err(e) => {
|
||||
error!("VCPU generated error: {:?}", Error::VcpuRun(e.into()));
|
||||
vcpu_run_interrupted.store(true, Ordering::SeqCst);
|
||||
exit_evt.write(1).unwrap();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user