Received: from eggs.gnu.org ([140.186.70.92]:56639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUiLb-0002KF-VV for qemu-devel@nongnu.org; Thu, 09 Jun 2011 12:44:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUiLY-0006Aw-L5 for qemu-devel@nongnu.org; Thu, 09 Jun 2011 12:44:43 -0400 Received: from david.siemens.de ([192.35.17.14]:18470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUiLY-0006AL-5o for qemu-devel@nongnu.org; Thu, 09 Jun 2011 12:44:40 -0400 Message-ID: <4DF0F86E.8040307@siemens.com> Date: Thu, 09 Jun 2011 18:44:30 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] vmstate: Add unmigratable flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel 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 --- 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