From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48914 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3wYF-0002h5-4w for qemu-devel@nongnu.org; Thu, 07 Oct 2010 15:54:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3wYD-00006D-UG for qemu-devel@nongnu.org; Thu, 07 Oct 2010 15:54:50 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:64266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3wYD-000063-Rk for qemu-devel@nongnu.org; Thu, 07 Oct 2010 15:54:49 -0400 Received: by yxf34 with SMTP id 34so128554yxf.4 for ; Thu, 07 Oct 2010 12:54:49 -0700 (PDT) Message-ID: <4CAE2586.1080003@codemonkey.ws> Date: Thu, 07 Oct 2010 14:54:46 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/2] USB CCID device References: <2052681331.708791286437179606.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> In-Reply-To: <2052681331.708791286437179606.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: qemu-devel@nongnu.org, Gerd Hoffmann On 10/07/2010 02:39 AM, Alon Levy wrote: > ----- "Anthony Liguori" wrote: > > >> On 10/06/2010 03:55 AM, Gerd Hoffmann wrote: >> >>> On 10/06/10 02:28, Alon Levy wrote: >>> >>>> >>>>> Does this work with live migration? I can't see how it would. >>>>> >>>>> >>>> No, it doesn't right now. It would require cooperation with the >>>> >> client, >> >>>> to tell it to reconnect to the target qemu (kind of like spice). >>>> >>> I think until we have this migration should have pretty much the >>> >> same >> >>> effect as a chardev disconnect, i.e. detach the usb device (which >>> >> the >> >>> guest will see as unplug). >>> >> Better yet, mark the guest as unmigrateable and let the management >> tool >> unplug the usb device before migration and replug it after migration. >> >> It's the same principle behind device assignment. >> >> > Is there any way to also get a pre_migrate callback with register_device_unmigratable? > I'd like to send a VSC_Reconnect message, then the guest sees an unplug, then migration, > No. The disconnect needs to happen in the management tooling layer. Same is true for any device doing hardware passthrough. Automagic unplugging/plugging during migration is not a good idea universally so it's something that needs to happen as a policy at the management level. Regards, Anthony Liguori > then (no plug yet since the device is marked as auto_attach=0) client reconnects > (actually this happens before but to a paused machine waiting for migration), and then > causes attachement, same as a new machine. > > >> Regards, >> >> Anthony Liguori >> >> >>> Needs some code though, at minimum you'll have to xfer the connected >>> >> >>> state from the migration source and have some bits in post_load() >>> which do attach/detach if needed. >>> >>> cheers, >>> Gerd >>> >>>