From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQ2aX-0000Qo-C1 for qemu-devel@nongnu.org; Mon, 14 Nov 2011 14:53:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQ2aW-00077B-EP for qemu-devel@nongnu.org; Mon, 14 Nov 2011 14:53:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQ2aW-000777-6E for qemu-devel@nongnu.org; Mon, 14 Nov 2011 14:53:04 -0500 From: Juan Quintela In-Reply-To: <4EC11D0A.3060703@us.ibm.com> (Anthony Liguori's message of "Mon, 14 Nov 2011 07:52:10 -0600") 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> Date: Mon, 14 Nov 2011 20:52:56 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 2/7] ivshmem: use migration blockers to prevent live migration in peer mode Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , Lucas Meneghel Rodrigues , Stefan Hajnoczi , qemu-devel@nongnu.org, Avi Kivity 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. 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.