From 1712cb5aaacd94b70666447b7d7a5a177ae99ccd Mon Sep 17 00:00:00 2001 From: Mingwang Li Date: Fri, 30 Sep 2022 14:21:58 +0800 Subject: [PATCH] Fix: After the VM is stopped, the stratovirt process does not exit After the VM shutdown command is executed, the vcpu thread does not send power_button event to the main thread. As a result, the main thread still epoll wait. Signed-off-by: Mingwang Li --- machine/src/standard_vm/aarch64/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machine/src/standard_vm/aarch64/mod.rs b/machine/src/standard_vm/aarch64/mod.rs index 5fcfa267..fb9de437 100644 --- a/machine/src/standard_vm/aarch64/mod.rs +++ b/machine/src/standard_vm/aarch64/mod.rs @@ -950,6 +950,8 @@ impl MachineLifecycle for StdMachine { if !self.notify_lifecycle(vmstate, KvmVmState::Shutdown) { return false; } + + self.power_button.write(1).unwrap(); true } -- Gitee