aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2014-05-14 16:30:08 -0300
committerAndreas Färber <afaerber@suse.de>2014-06-25 23:54:57 +0200
commit7d854c471a2180037b49547e31bd940166513657 (patch)
tree78ee6a9e7372792774f76864cecd6c9857aaed3a /savevm.c
parent120eee7d1fdb2eba15766cfff7b9bcdc902690b4 (diff)
downloadqemu-arm-7d854c471a2180037b49547e31bd940166513657.tar.gz
savevm: check vmsd for migratability status
Check vmsd for unmigratable field, allowing migratibility status to be modified after vmstate_register. Cc: Juan Quintela <quintela@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/savevm.c b/savevm.c
index ba900d304b..e19ae0a9b2 100644
--- a/savevm.c
+++ b/savevm.c
@@ -232,7 +232,6 @@ typedef struct SaveStateEntry {
const VMStateDescription *vmsd;
void *opaque;
CompatEntry *compat;
- int no_migrate;
int is_ram;
} SaveStateEntry;
@@ -430,7 +429,6 @@ int register_savevm_live(DeviceState *dev,
se->ops = ops;
se->opaque = opaque;
se->vmsd = NULL;
- se->no_migrate = 0;
/* if this is a live_savem then set is_ram */
if (ops->save_live_setup != NULL) {
se->is_ram = 1;
@@ -521,7 +519,6 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
se->opaque = opaque;
se->vmsd = vmsd;
se->alias_id = alias_id;
- se->no_migrate = vmsd->unmigratable;
if (dev) {
char *id = qdev_get_dev_path(dev);
@@ -590,7 +587,7 @@ bool qemu_savevm_state_blocked(Error **errp)
SaveStateEntry *se;
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
- if (se->no_migrate) {
+ if (se->vmsd && se->vmsd->unmigratable) {
error_setg(errp, "State blocked by non-migratable device '%s'",
se->idstr);
return true;