[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/18] migration/vmstate: Introduce vmstate_no_state_to_migrate
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 02/18] migration/vmstate: Introduce vmstate_no_state_to_migrate |
Date: |
Fri, 3 Jul 2020 22:18:55 +0200 |
Introduce a special state to indicate when an object doesn't
have anything in its state to migrate.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/migration/vmstate.h | 1 +
migration/vmstate.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index af7d80cd4e..0922bc8efa 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -195,6 +195,7 @@ struct VMStateDescription {
};
extern const VMStateDescription vmstate_dummy; /* Exclusively for linux-user */
+extern const VMStateDescription vmstate_no_state_to_migrate;
extern const VMStateInfo vmstate_info_bool;
diff --git a/migration/vmstate.c b/migration/vmstate.c
index bafa890384..d640cafad3 100644
--- a/migration/vmstate.c
+++ b/migration/vmstate.c
@@ -20,6 +20,13 @@
#include "trace.h"
#include "qjson.h"
+const VMStateDescription vmstate_no_state_to_migrate = {
+ .name = "empty-state",
+ .fields = (VMStateField[]) {
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static int vmstate_subsection_save(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque, QJSON *vmdesc);
static int vmstate_subsection_load(QEMUFile *f, const VMStateDescription *vmsd,
--
2.21.3
- [PATCH 00/18] hw: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 01/18] migration/vmstate: Document vmstate_dummy, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 02/18] migration/vmstate: Introduce vmstate_no_state_to_migrate,
Philippe Mathieu-Daudé <=
- [PATCH 03/18] hw/core/qdev: Add vmstate_qdev_no_state_to_migrate, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 04/18] hw/arm/armv7m: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 06/18] hw/arm/bcm283x: Mark devices with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 05/18] hw/arm/aspeed_soc: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 07/18] hw/arm/msf2-soc: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 08/18] hw/core/split-irq: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 09/18] hw/cpu/a9mpcore: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03