[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 20/20] migration/vmstate: Simplify vmstate for user-mode C
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH v2 20/20] migration/vmstate: Simplify vmstate for user-mode CPU |
Date: |
Sun, 17 Jan 2021 20:24:46 +0100 |
User-mode wants an empty vmstate for the CPUs. We can
use the generic vmstate_no_state_to_migrate object which
is the same.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/core/cpu.h | 2 +-
include/migration/vmstate.h | 3 ---
stubs/vmstate.c | 9 ---------
3 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index c79a58db9b9..01e75cc7403 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -1132,7 +1132,7 @@ bool target_words_bigendian(void);
#ifdef CONFIG_SOFTMMU
extern const VMStateDescription vmstate_cpu_common;
#else
-#define vmstate_cpu_common vmstate_user_mode_cpu_dummy
+#define vmstate_cpu_common vmstate_no_state_to_migrate
#endif
#define VMSTATE_CPU() { \
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 50559598eac..dfe20b5caa1 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -194,9 +194,6 @@ struct VMStateDescription {
const VMStateDescription **subsections;
};
-#if defined(CONFIG_USER_ONLY)
-extern const VMStateDescription vmstate_user_mode_cpu_dummy;
-#endif
extern const VMStateDescription vmstate_no_state_to_migrate;
extern const VMStateInfo vmstate_info_bool;
diff --git a/stubs/vmstate.c b/stubs/vmstate.c
index 1d0e03e233b..c360a929f60 100644
--- a/stubs/vmstate.c
+++ b/stubs/vmstate.c
@@ -1,15 +1,6 @@
#include "qemu/osdep.h"
#include "migration/vmstate.h"
-#if defined(CONFIG_USER_ONLY)
-const VMStateDescription vmstate_user_mode_cpu_dummy = {
- .name = "cpu_common_user",
- .fields = (VMStateField[]) {
- VMSTATE_END_OF_LIST()
- },
-};
-#endif
-
const VMStateDescription vmstate_no_state_to_migrate = {
.name = "empty-state",
.fields = (VMStateField[]) {
--
2.26.2
- [RFC PATCH v2 13/20] hw/misc/iotkit-sysinfo: Mark the device with no migratable fields, (continued)
- [RFC PATCH v2 13/20] hw/misc/iotkit-sysinfo: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 14/20] hw/misc/unimp: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 15/20] hw/nubus/mac-nubus-bridge: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 16/20] hw/sparc64/sun4u: Mark devices with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 17/20] hw/pci-host/gpex: Mark device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 18/20] hw/core/qdev: Display warning for devices missing migration state, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 19/20] stubs/vmstate: Add VMSTATE_END_OF_LIST to vmstate_user_mode_cpu_dummy, Philippe Mathieu-Daudé, 2021/01/17
- [RFC PATCH v2 20/20] migration/vmstate: Simplify vmstate for user-mode CPU,
Philippe Mathieu-Daudé <=