From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfC0O-0006IN-KC for qemu-devel@nongnu.org; Fri, 08 Jul 2011 10:26:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QfC0M-0001vY-Qi for qemu-devel@nongnu.org; Fri, 08 Jul 2011 10:26:08 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:64898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfC0M-0001vF-4i for qemu-devel@nongnu.org; Fri, 08 Jul 2011 10:26:06 -0400 Received: by gyf2 with SMTP id 2so943454gyf.4 for ; Fri, 08 Jul 2011 07:26:04 -0700 (PDT) Message-ID: <4E17137A.1010308@codemonkey.ws> Date: Fri, 08 Jul 2011 09:26:02 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1310115239-19288-1-git-send-email-kraxel@redhat.com> <1310115239-19288-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1310115239-19288-2-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] vmstate: add no_migrate flag to VMStateDescription List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On 07/08/2011 03:53 AM, Gerd Hoffmann wrote: > 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 register_device_unmigratable()? Regards, Anthony Liguori > --- > 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 9dd7096..1eb3486 100644 > --- a/hw/hw.h > +++ b/hw/hw.h > @@ -324,6 +324,7 @@ typedef struct VMStateSubsection { > > struct VMStateDescription { > const char *name; > + int no_migrate; > int version_id; > int minimum_version_id; > int minimum_version_id_old; > diff --git a/savevm.c b/savevm.c > index 8139bc7..fa2da3e 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->no_migrate; > > if (dev&& dev->parent_bus&& dev->parent_bus->info->get_dev_path) { > char *id = dev->parent_bus->info->get_dev_path(dev);