From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQ2d0-00023u-Te for qemu-devel@nongnu.org; Mon, 14 Nov 2011 14:55:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQ2cz-0007g7-R0 for qemu-devel@nongnu.org; Mon, 14 Nov 2011 14:55:38 -0500 Received: from mail-vw0-f45.google.com ([209.85.212.45]:62569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQ2cz-0007fO-OW for qemu-devel@nongnu.org; Mon, 14 Nov 2011 14:55:37 -0500 Received: by vws17 with SMTP id 17so6106247vws.4 for ; Mon, 14 Nov 2011 11:55:37 -0800 (PST) Message-ID: <4EC17236.7050905@codemonkey.ws> Date: Mon, 14 Nov 2011 13:55:34 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1321113420-3252-1-git-send-email-aliguori@us.ibm.com> <1321113420-3252-2-git-send-email-aliguori@us.ibm.com> <4EC11D0A.3060703@us.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/7] ivshmem: use migration blockers to prevent live migration in peer mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com Cc: Kevin Wolf , Lucas Meneghel Rodrigues , Anthony Liguori , Stefan Hajnoczi , qemu-devel@nongnu.org, Avi Kivity On 11/14/2011 01:52 PM, Juan Quintela wrote: > Anthony Liguori wrote: >> On 11/14/2011 07:05 AM, Juan Quintela wrote: >>> Anthony Liguori wrote: >>>> Now when you try to migrate with ivshmem, you get a proper QMP error: >>>> >>>> (qemu) migrate tcp:localhost:1025 >>>> Migration is disabled when using feature 'peer mode' in device 'ivshmem' >>>> (qemu) >>> >>> This was the only user of register_device_unmigratable(), just to remove >>> function if we continue this path. >> >> There are a couple more in usb also but I can convert them too. > > usb uses "yet another" way to make devices unmigratable. > > static const VMStateDescription vmstate_usb_host = { > .name = "usb-host", > .unmigratable = 1, > }; > > So, we have "already" two ways to make a device unmigratable: > - calling register_device_unmigratable() (ivhs) > - definining in vmstate .unmigratable = 1 > - and now your new way. > > My point was that only one (or even two) should be enough. Ah, yes, I see now. I'll remove that function. Regards, Anthony Liguori > > Why two? because the .unmigratable way is very useful for devices that > haven't been made "migratable", but that are converted to qdev. Not > jthat this couldn't be "fixed" on registration with a call to > migrate_add_blocker. > > Later, Juan. >