diff options
author | Steve Sistare <steven.sistare@oracle.com> | 2024-01-03 12:05:32 -0800 |
---|---|---|
committer | Peter Xu <peterx@redhat.com> | 2024-01-04 09:52:42 +0800 |
commit | 0f1db069b6c5e7f7ddcdcc9c64fd4b6dbe4afcdf (patch) | |
tree | 4d3d938503ae964c4551e2a8b57f2b7e84427826 /hw/xen | |
parent | b9ae473d80302519a7b89f98795a80abfea1deea (diff) |
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>
Diffstat (limited to 'hw/xen')
-rw-r--r-- | hw/xen/xen-hvm-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index 565dc39c8f..47e6cb1db3 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -623,7 +623,7 @@ void xen_hvm_change_state_handler(void *opaque, bool running, xen_set_ioreq_server_state(xen_domid, state->ioservid, - (rstate == RUN_STATE_RUNNING)); + running); } void xen_exit_notifier(Notifier *n, void *data) |