From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnjDx-0005tn-PC for qemu-devel@nongnu.org; Sun, 18 Oct 2015 04:21:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnjDu-0000D0-Gf for qemu-devel@nongnu.org; Sun, 18 Oct 2015 04:21:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnjDu-0000CE-5s for qemu-devel@nongnu.org; Sun, 18 Oct 2015 04:21:46 -0400 Date: Sun, 18 Oct 2015 11:21:41 +0300 From: "Michael S. Tsirkin" Message-ID: <20151018111716-mutt-send-email-mst@redhat.com> References: <1444403861-3240-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v8 00/27] vhost-user: add migration support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thibaut Collet Cc: Linhaifeng , marcandre lureau , Jason Wang , qemu-devel , Paolo Bonzini On Tue, Oct 13, 2015 at 02:19:41PM +0200, Thibaut Collet wrote: > Hi, >=20 > I have still a comment on this serie. During rebase operation with mult= iqueue a > modification has been lost. > This lost impact only guest without GUEST_ANNOUNCE capabilities: the ba= ckend is > not notified to send a fake RARP to reduce VM outage. >=20 > Sorry for the late notice but I have tested only recent guest to give m= y ack > yesterday. >=20 > Marc Andre and Michael could you apply the attached fixup to the patch = "vhost > user: add support of live migration" on the pull request ? >=20 > Thanks >=20 > Best regards. The way to post fixups is just like a regular patch, but prepend fixup! on the subject line. Comments can come after the --- line. > On Mon, Oct 12, 2015 at 5:56 PM, Thibaut Collet > wrote: >=20 >=20 >=20 > On Fri, Oct 9, 2015 at 5:17 PM, wrote= : >=20 > From: Marc-Andr=E9 Lureau >=20 > Hi, >=20 > The following series implement shareable log for vhost-user to = support > memory tracking during live migration. On qemu-side, the soluti= on is > fairly straightfoward since vhost already supports the dirty lo= g, only > vhost-user couldn't access the log memory until then. >=20 > The series includes "vhost user: Add live migration" patches fr= om > Thibaut Collet. >=20 > v7->v8: > - rebased > - fix build on osx & aarch64 > - add seccomp patch from Eduardo > - fix enum usage and MQ (squashed Thibaut fix) > - fixed vhost_net_notify_migration_done() fallback > - split util-obj- on multi-lines in seperate patch >=20 > v6->v7: > - add migration blocker if memfd failed > - add doc about the qemu_memfd_alloc() helper > - (rebase on top of Michael pci branch) >=20 > v5->v6: > - rebased > - fix protocol feature mask update > - add a patch from Thibault Collet using enum for features, and > =A0 compute mask > - add unistd.h linux headers to help building memfd if missing = on > =A0 build host. Hopefully will be useful for other syscalls som= e day > - reorder/merge patches to share-allocate the log only if neede= d > - split the memfd helper to allow to drop the fallback code > - allow to call qemu_memfd_free() even if alloc failed > - add some missing spaces >=20 > v4->v5: > - rebase on top of last Michael S. Tsirkin PULL request > - block live migration if !PROTOCOL_F_LOG_SHMFD > - wait for a reply after SET_LOG_BASE > - split vhost_set_log_base from the rest of vhost_call refactor= ing > - use a seperate global vhost_log_shm >=20 > v3->v4: > - add the proto negotiation & the migration series > - replace the varargs vhost_call() approach for callbacks > - only share-allocate when the backend needs it >=20 > v2->v3: > - changed some patch summary > - added migration tests > - added a patch to replace error message with a trace >=20 > The development branch I used is: > https://github.com/elmarco/qemu branch "vhost-user" >=20 > Eduardo Otubo (1): > =A0 seccomp: add memfd_create to whitelist >=20 > Marc-Andr=E9 Lureau (22): > =A0 configure: probe for memfd > =A0 linux-headers: add unistd.h > =A0 build-sys: split util-obj- on multi-lines > =A0 util: add linux-only memfd fallback > =A0 util: add memfd helpers > =A0 util: add fallback for qemu_memfd_alloc() > =A0 vhost: document log resizing > =A0 vhost: add vhost_set_log_base op > =A0 vhost-user: add vhost_user_requires_shm_log() > =A0 vhost: alloc shareable log > =A0 vhost-user: send log shm fd along with log_base > =A0 vhost-user: add a migration blocker > =A0 vhost: use a function for each call > =A0 vhost-user: document migration log > =A0 net: add trace_vhost_user_event > =A0 vhost: add migration block if memfd failed > =A0 vhost-user-test: move wait_for_fds() out > =A0 vhost-user-test: remove useless static check > =A0 vhost-user-test: wrap server in TestServer struct > =A0 vhost-user-test: learn to tweak various qemu arguments > =A0 vhost-user-test: add live-migration test > =A0 vhost-user-test: check ownership during migration >=20 > Michael S. Tsirkin (1): > =A0 exec: factor out duplicate mmap code >=20 > Thibaut Collet (3): > =A0 vhost user: add support of live migration > =A0 vhost user: add rarp sending after live migration for legac= y guest > =A0 vhost-user: use an enum helper for features mask >=20 > =A0configure=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= |=A0 =A019 + > =A0docs/specs/vhost-user.txt=A0 =A0 =A0 =A0 =A0 |=A0 =A063 ++- > =A0exec.c=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0|=A0 =A047 +- > =A0hw/net/vhost_net.c=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|=A0 =A0= 35 +- > =A0hw/scsi/vhost-scsi.c=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|=A0 =A0 = 7 +- > =A0hw/virtio/vhost-backend.c=A0 =A0 =A0 =A0 =A0 |=A0 121 +++- > =A0hw/virtio/vhost-user.c=A0 =A0 =A0 =A0 =A0 =A0 =A0|=A0 576 ++= ++++++++++------- > =A0hw/virtio/vhost.c=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 12= 1 ++-- > =A0include/hw/virtio/vhost-backend.h=A0 |=A0 =A077 ++- > =A0include/hw/virtio/vhost.h=A0 =A0 =A0 =A0 =A0 |=A0 =A015 +- > =A0include/net/vhost_net.h=A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0 1 + > =A0include/qemu/memfd.h=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|=A0 =A02= 6 + > =A0include/qemu/mmap-alloc.h=A0 =A0 =A0 =A0 =A0 |=A0 =A010 + > =A0linux-headers/asm-arm/unistd.h=A0 =A0 =A0|=A0 448 ++++++++++= +++++ > =A0linux-headers/asm-arm64/kvm.h=A0 =A0 =A0 |=A0 =A037 +- > =A0linux-headers/asm-arm64/unistd.h=A0 =A0|=A0 =A016 + > =A0linux-headers/asm-mips/unistd.h=A0 =A0 | 1063 > ++++++++++++++++++++++++++++++++++++ > =A0linux-headers/asm-powerpc/unistd.h |=A0 392 +++++++++++++ > =A0linux-headers/asm-s390/unistd.h=A0 =A0 |=A0 404 ++++++++++++= ++ > =A0linux-headers/asm-x86/unistd.h=A0 =A0 =A0|=A0 =A015 + > =A0linux-headers/asm-x86/unistd_32.h=A0 |=A0 377 +++++++++++++ > =A0linux-headers/asm-x86/unistd_64.h=A0 |=A0 330 +++++++++++ > =A0linux-headers/asm-x86/unistd_x32.h |=A0 319 +++++++++++ > =A0net/vhost-user.c=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|=A0 = =A034 +- > =A0qemu-seccomp.c=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|=A0= =A0 3 +- > =A0scripts/update-linux-headers.sh=A0 =A0 |=A0 =A0 7 +- > =A0tests/vhost-user-test.c=A0 =A0 =A0 =A0 =A0 =A0 |=A0 372 ++++= +++++++-- > =A0trace-events=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|= =A0 =A0 3 + > =A0util/Makefile.objs=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|=A0 =A0= 13 +- > =A0util/memfd.c=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|= =A0 162 ++++++ > =A0util/mmap-alloc.c=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |=A0 =A0= 71 +++ > =A0util/oslib-posix.c=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|=A0 =A0= 28 +- > =A032 files changed, 4814 insertions(+), 398 deletions(-) > =A0create mode 100644 include/qemu/memfd.h > =A0create mode 100644 include/qemu/mmap-alloc.h > =A0create mode 100644 linux-headers/asm-arm/unistd.h > =A0create mode 100644 linux-headers/asm-arm64/unistd.h > =A0create mode 100644 linux-headers/asm-mips/unistd.h > =A0create mode 100644 linux-headers/asm-powerpc/unistd.h > =A0create mode 100644 linux-headers/asm-s390/unistd.h > =A0create mode 100644 linux-headers/asm-x86/unistd.h > =A0create mode 100644 linux-headers/asm-x86/unistd_32.h > =A0create mode 100644 linux-headers/asm-x86/unistd_64.h > =A0create mode 100644 linux-headers/asm-x86/unistd_x32.h > =A0create mode 100644 util/memfd.c > =A0create mode 100644 util/mmap-alloc.c > =20 > -- > 2.4.3 >=20 > =20 >=20 > Acked-by: Thibaut Collet =A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 >=20 >=20 >=20 >=20 > From bd39e9efb7034077f5516debd8b504ffcc10c780 Mon Sep 17 00:00:00 2001 > From: Thibaut Collet > Date: Tue, 13 Oct 2015 14:01:44 +0200 > Subject: [PATCH] FIXUP: vhost user: add support of live migration >=20 > Removal of receive disable has been lost during rebase with multiqueue = feature. > Without this fixup migration of old guest (without GUEST_ANNOUNCE) is n= ot > notified as the RARP request is not sent to the vhost user backend. >=20 > Signed-off-by: Thibaut Collet I picked this up, but I had to do a lot of tweaking to even get the patch series to apply. If you want all this to go upstream, please test it here: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git refs/tags/for_thibaut And send a tested-by tag on list. > --- > net/vhost-user.c | 2 -- > 1 file changed, 2 deletions(-) >=20 > diff --git a/net/vhost-user.c b/net/vhost-user.c > index cfe11b8..17b5c2a 100644 > --- a/net/vhost-user.c > +++ b/net/vhost-user.c > @@ -212,8 +212,6 @@ static int net_vhost_user_init(NetClientState *peer= , const char *device, > snprintf(nc->info_str, sizeof(nc->info_str), "vhost-user%d to = %s", > i, chr->label); > =20 > - /* We don't provide a receive callback */ > - nc->receive_disabled =3D 1; > nc->queue_index =3D i; > =20 > s =3D DO_UPCAST(VhostUserState, nc, nc); > --=20 > 2.1.4 >=20