diff mbox series

[1/6] migration: is_ram changed to is_iterable

Message ID 20211224111148.345438-2-nikita.lapshin@virtuozzo.com (mailing list archive)
State New, archived
Headers show
Series migration: Add 'no-ram' and 'ram-only' cpabilities | expand

Commit Message

Nikta Lapshin Dec. 24, 2021, 11:11 a.m. UTC
For new migration capabilities upcoming we need to use something
like is_ram for this purpose. This member of struction is true
not only for RAM so it should be renamed.

Signed-off-by: Nikita Lapshin <nikita.lapshin@virtuozzo.com>
---
 migration/savevm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Vladimir Sementsov-Ogievskiy Dec. 28, 2021, 12:52 p.m. UTC | #1
24.12.2021 14:11, Nikita Lapshin wrote:
> For new migration capabilities upcoming we need to use something
> like is_ram for this purpose. This member of struction is true
> not only for RAM so it should be renamed.
> 
> Signed-off-by: Nikita Lapshin<nikita.lapshin@virtuozzo.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
diff mbox series

Patch

diff --git a/migration/savevm.c b/migration/savevm.c
index 0bef031acb..f90fdb2bdd 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -248,7 +248,7 @@  typedef struct SaveStateEntry {
     const VMStateDescription *vmsd;
     void *opaque;
     CompatEntry *compat;
-    int is_ram;
+    int is_iterable;
 } SaveStateEntry;
 
 typedef struct SaveState {
@@ -797,9 +797,9 @@  int register_savevm_live(const char *idstr,
     se->ops = ops;
     se->opaque = opaque;
     se->vmsd = NULL;
-    /* if this is a live_savem then set is_ram */
+    /* if this is a live_savem then set is_iterable */
     if (ops->save_setup != NULL) {
-        se->is_ram = 1;
+        se->is_iterable = 1;
     }
 
     pstrcat(se->idstr, sizeof(se->idstr), idstr);
@@ -1625,7 +1625,7 @@  int qemu_save_device_state(QEMUFile *f)
     QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
         int ret;
 
-        if (se->is_ram) {
+        if (se->is_iterable) {
             continue;
         }
         if ((!se->ops || !se->ops->save_state) && !se->vmsd) {
@@ -2428,7 +2428,7 @@  qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
     se->load_section_id = section_id;
 
     /* Validate if it is a device's state */
-    if (xen_enabled() && se->is_ram) {
+    if (xen_enabled() && se->is_iterable) {
         error_report("loadvm: %s RAM loading not allowed on Xen", idstr);
         return -EINVAL;
     }