From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3JOs-0003t4-PI for qemu-devel@nongnu.org; Mon, 30 Nov 2015 03:01:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3JOo-0008AQ-Lp for qemu-devel@nongnu.org; Mon, 30 Nov 2015 03:01:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3JOo-0008A9-Gv for qemu-devel@nongnu.org; Mon, 30 Nov 2015 03:01:26 -0500 Date: Mon, 30 Nov 2015 10:01:18 +0200 From: "Michael S. Tsirkin" Message-ID: <20151130095454-mutt-send-email-mst@redhat.com> References: <1448372127-28115-1-git-send-email-tianyu.lan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448372127-28115-1-git-send-email-tianyu.lan@intel.com> Subject: Re: [Qemu-devel] [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lan Tianyu Cc: qemu-devel@nongnu.org, emil.s.tantilov@intel.com, kvm@vger.kernel.org, ard.biesheuvel@linaro.org, aik@ozlabs.ru, donald.c.skidmore@intel.com, quintela@redhat.com, eddie.dong@intel.com, nrupal.jani@intel.com, agraf@suse.de, blauwirbel@gmail.com, cornelia.huck@de.ibm.com, alex.williamson@redhat.com, kraxel@redhat.com, anthony@codemonkey.ws, amit.shah@redhat.com, pbonzini@redhat.com, mark.d.rustad@intel.com, lcapitulino@redhat.com, gerlitz.or@gmail.com On Tue, Nov 24, 2015 at 09:35:17PM +0800, Lan Tianyu wrote: > This patchset is to propose a solution of adding live migration > support for SRIOV NIC. > > During migration, Qemu needs to let VF driver in the VM to know > migration start and end. Qemu adds faked PCI migration capability > to help to sync status between two sides during migration. > > Qemu triggers VF's mailbox irq via sending MSIX msg when migration > status is changed. VF driver tells Qemu its mailbox vector index > via the new PCI capability. In some cases(NIC is suspended or closed), > VF mailbox irq is freed and VF driver can disable irq injecting via > new capability. > > VF driver will put down nic before migration and put up again on > the target machine. It is still not very clear what it is you are trying to achieve, and whether your patchset achieves it. You merely say "adding live migration" but it seems pretty clear this isn't about being able to migrate a guest transparently, since you are adding a host/guest handshake. This isn't about functionality either: I think that on KVM, it isn't hard to live migrate if you can do a host/guest handshake, even today, with no kernel changes: 1. before migration, expose a pv nic to guest (can be done directly on boot) 2. use e.g. a serial connection to move IP from an assigned device to pv nic 3. maybe move the mac as well 4. eject the assigned device 5. detect eject on host (QEMU generates a DEVICE_DELETED event when this happens) and start migration Is this patchset a performance optimization then? If yes it needs to be accompanied with some performance numbers. -- MST