[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] vmstate: Add unmigratable flag
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH] vmstate: Add unmigratable flag |
Date: |
Thu, 09 Jun 2011 18:44:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
A first step towards getting rid of register_device_unmigratable
(ivshmem and lacking vmstate support in virtio are blocking this):
Allow to register an unmigratable vmstate via qdev, i.e. tag a device
declaratively.
Signed-off-by: Jan Kiszka <address@hidden>
---
hw/hw.h | 1 +
savevm.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 56447a7..97c474e 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -333,6 +333,7 @@ struct VMStateDescription {
void (*pre_save)(void *opaque);
VMStateField *fields;
const VMStateSubsection *subsections;
+ bool unmigratable;
};
extern const VMStateInfo vmstate_info_bool;
diff --git a/savevm.c b/savevm.c
index 939845c..98b2422 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1234,6 +1234,7 @@ 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 && dev->parent_bus && dev->parent_bus->info->get_dev_path) {
char *id = dev->parent_bus->info->get_dev_path(dev);
--
1.7.1
- [Qemu-devel] [PATCH] vmstate: Add unmigratable flag,
Jan Kiszka <=