From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUlOm-0006vX-JI for qemu-devel@nongnu.org; Thu, 09 Jun 2011 16:00:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUlOg-00022o-5X for qemu-devel@nongnu.org; Thu, 09 Jun 2011 16:00:11 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:35753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUlOf-00021O-SC for qemu-devel@nongnu.org; Thu, 09 Jun 2011 16:00:05 -0400 Received: by gxk26 with SMTP id 26so1260104gxk.4 for ; Thu, 09 Jun 2011 13:00:04 -0700 (PDT) Message-ID: <4DF12642.1050707@codemonkey.ws> Date: Thu, 09 Jun 2011 15:00:02 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4DF0F86E.8040307@siemens.com> In-Reply-To: <4DF0F86E.8040307@siemens.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vmstate: Add unmigratable flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel , Juan Quintela On 06/09/2011 11:44 AM, Jan Kiszka wrote: > 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. I thought part of the problem with this was that for some devices (like ivshmem), whether it can be migrated was dynamic. It depends on configuration, state, etc. Regards, Anthony Liguori > > 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);