[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/21] runstate: add runstate_get()
|
From: |
Juan Quintela |
|
Subject: |
[PULL 01/21] runstate: add runstate_get() |
|
Date: |
Tue, 30 May 2023 13:54:09 +0200 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
It's necessary to restore the state after failed/cancelled migration in
further commit.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230517123752.21615-2-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
include/sysemu/runstate.h | 1 +
softmmu/runstate.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h
index f3ed52548e..85f5d9a419 100644
--- a/include/sysemu/runstate.h
+++ b/include/sysemu/runstate.h
@@ -6,6 +6,7 @@
bool runstate_check(RunState state);
void runstate_set(RunState new_state);
+RunState runstate_get(void);
bool runstate_is_running(void);
bool runstate_needs_reset(void);
bool runstate_store(char *str, size_t size);
diff --git a/softmmu/runstate.c b/softmmu/runstate.c
index 2f2396c819..1e6f0bcecc 100644
--- a/softmmu/runstate.c
+++ b/softmmu/runstate.c
@@ -221,6 +221,11 @@ void runstate_set(RunState new_state)
current_run_state = new_state;
}
+RunState runstate_get(void)
+{
+ return current_run_state;
+}
+
bool runstate_is_running(void)
{
return runstate_check(RUN_STATE_RUNNING);
--
2.40.1
- [PULL 00/21] Migration 20230530 patches, Juan Quintela, 2023/05/30
- [PULL 03/21] runstate: drop unused runstate_store(), Juan Quintela, 2023/05/30
- [PULL 01/21] runstate: add runstate_get(),
Juan Quintela <=
- [PULL 06/21] migration: Don't abuse qemu_file transferred for RDMA, Juan Quintela, 2023/05/30
- [PULL 07/21] migration/RDMA: It is accounting for zero/normal pages in two places, Juan Quintela, 2023/05/30
- [PULL 09/21] migration/rdma: Don't use imaginary transfers, Juan Quintela, 2023/05/30
- [PULL 11/21] migration/rdma: Simplify the function that saves a page, Juan Quintela, 2023/05/30
- [PULL 04/21] migration: switch from .vm_was_running to .vm_old_state, Juan Quintela, 2023/05/30
- [PULL 02/21] migration: never fail in global_state_store(), Juan Quintela, 2023/05/30
- [PULL 05/21] migration: restore vmstate on migration failure, Juan Quintela, 2023/05/30
- [PULL 08/21] migration/rdma: Remove QEMUFile parameter when not used, Juan Quintela, 2023/05/30
- [PULL 10/21] migration: Remove unused qemu_file_credit_transfer(), Juan Quintela, 2023/05/30
- [PULL 14/21] migration/rdma: Unfold ram_control_after_iterate(), Juan Quintela, 2023/05/30