mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 16:57:20 +00:00
hv: pm: avoid duplicate shutdowns on RTVM
It is possible for more than one vCPUs to trigger shutdown on an RTVM. We need to avoid entering VM_READY_TO_POWEROFF state again after the RTVM has been paused or shut down. Also, make sure an RTVM enters VM_READY_TO_POWEROFF state before it can be paused. v1 -> v2: - rename to poweroff_if_rt_vm for better clarity Tracked-On: #5411 Signed-off-by: Peter Fang <peter.fang@intel.com>
This commit is contained in:
@@ -214,6 +214,7 @@ static inline uint16_t vmid_2_rel_vmid(uint16_t sos_vmid, uint16_t vmid) {
|
||||
void make_shutdown_vm_request(uint16_t pcpu_id);
|
||||
bool need_shutdown_vm(uint16_t pcpu_id);
|
||||
int32_t shutdown_vm(struct acrn_vm *vm);
|
||||
void poweroff_if_rt_vm(struct acrn_vm *vm);
|
||||
void pause_vm(struct acrn_vm *vm);
|
||||
void resume_vm_from_s3(struct acrn_vm *vm, uint32_t wakeup_vec);
|
||||
void start_vm(struct acrn_vm *vm);
|
||||
|
Reference in New Issue
Block a user