diff --git a/hypervisor/arch/x86/guest/vm_reset.c b/hypervisor/arch/x86/guest/vm_reset.c index 77cfbdb38..344af3760 100644 --- a/hypervisor/arch/x86/guest/vm_reset.c +++ b/hypervisor/arch/x86/guest/vm_reset.c @@ -10,6 +10,7 @@ #include #include #include +#include /** * @pre vm != NULL @@ -17,6 +18,7 @@ void triple_fault_shutdown_vm(struct acrn_vcpu *vcpu) { struct acrn_vm *vm = vcpu->vm; + struct vm_event trp_event; if (is_postlaunched_vm(vm)) { struct io_request *io_req = &vcpu->req; @@ -28,6 +30,10 @@ void triple_fault_shutdown_vm(struct acrn_vcpu *vcpu) io_req->reqs.pio_request.size = 2UL; io_req->reqs.pio_request.value = (VIRTUAL_PM1A_SLP_EN | (5U << 10U)); + /* Send the tripple fault event to DM. */ + trp_event.type = VM_EVENT_TRIPLE_FAULT; + (void)send_vm_event(vcpu->vm, &trp_event); + /* Inject pm1a S5 request to Service VM to shut down the guest */ (void)emulate_io(vcpu, io_req); } else {