From 55ccc6e99a0fb39af27916eb28ba26a412ecc048 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 11 Aug 2011 06:46:13 -0700 Subject: [RHEL6 qemu-kvm PATCH 2/4] vmstate: add no_migrate flag to VMStateDescription RH-Author: Gerd Hoffmann Message-id: <1313045175-25488-2-git-send-email-kraxel@redhat.com> Patchwork-id: 31263 O-Subject: [RHEL-6.2 kvm PATCH 1/3] vmstate: add no_migrate flag to VMStateDescription Bugzilla: 723870 RH-Acked-by: Amit Shah RH-Acked-by: Alex Williamson RH-Acked-by: Jes Sorensen This allows to easily tag devices as non-migratable, so any attempt to migrate a virtual machine with the device in question active will make migration fail. Signed-off-by: Gerd Hoffmann (cherry picked from commit 2837c8ea1f10c281c9ff68f397405f3596f8ce0b) Conflicts: savevm.c --- hw/hw.h | 1 + savevm.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) Signed-off-by: Eduardo Habkost --- 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 1686176..d535f23 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -324,6 +324,7 @@ typedef struct VMStateSubsection { struct VMStateDescription { const char *name; + int unmigratable; int version_id; int minimum_version_id; int minimum_version_id_old; diff --git a/savevm.c b/savevm.c index a669a6e..a532abd 100644 --- a/savevm.c +++ b/savevm.c @@ -1232,6 +1232,7 @@ int vmstate_register(DeviceState *dev, int instance_id, se->load_state = NULL; se->opaque = opaque; se->vmsd = vmsd; + 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.3.2