mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
cpus: check running not RUN_STATE_RUNNING
When a vm transitions from running to suspended, runstate notifiers are not called, so the notifiers still think the vm is running. Hence, when we call vm_start to restore the suspended state, we call vm_state_notify with running=1. However, some notifiers check for RUN_STATE_RUNNING. They must check the running boolean instead. No functional change. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/1704312341-66640-4-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
b9ae473d80
commit
0f1db069b6
4 changed files with 4 additions and 4 deletions
|
@ -2451,7 +2451,7 @@ static void usb_ehci_vm_state_change(void *opaque, bool running, RunState state)
|
|||
* USB-devices which have async handled packages have a packet in the
|
||||
* ep queue to match the completion with.
|
||||
*/
|
||||
if (state == RUN_STATE_RUNNING) {
|
||||
if (running) {
|
||||
ehci_advance_async_state(ehci);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue