From patchwork Thu Mar 8 19:57:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 883298 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zy1ck2Xm0z9sX0 for ; Fri, 9 Mar 2018 07:01:56 +1100 (AEDT) Received: from localhost ([::1]:41543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu1jd-0005Te-Vx for incoming@patchwork.ozlabs.org; Thu, 08 Mar 2018 15:01:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu1g7-0002zt-6E for qemu-devel@nongnu.org; Thu, 08 Mar 2018 14:58:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eu1g6-00060s-AW for qemu-devel@nongnu.org; Thu, 08 Mar 2018 14:58:15 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50658 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eu1g6-00060m-4b for qemu-devel@nongnu.org; Thu, 08 Mar 2018 14:58:14 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8E442BD9E for ; Thu, 8 Mar 2018 19:58:13 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-117-232.ams2.redhat.com [10.36.117.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C1F22024CA1; Thu, 8 Mar 2018 19:58:12 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, mst@redhat.com, maxime.coquelin@redhat.com, marcandre.lureau@redhat.com, peterx@redhat.com, quintela@redhat.com Date: Thu, 8 Mar 2018 19:57:42 +0000 Message-Id: <20180308195811.24894-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 08 Mar 2018 19:58:13 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 08 Mar 2018 19:58:13 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dgilbert@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v4 00/29] postcopy+vhost-user/shared ram X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aarcange@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Dr. David Alan Gilbert" This set enables postcopy migration with shared memory to a vhost user process. It's based off current head. Testing is mostly performed with dpdk, with corresponding modifications by Maxime. v4 is mostly just fixes from comments received during review of v3, and the normal updating of all the virtio enum's to catch up with other things getting in before us. Dave Dr. David Alan Gilbert (29): migrate: Update ram_block_discard_range for shared qemu_ram_block_host_offset postcopy: use UFFDIO_ZEROPAGE only when available postcopy: Add notifier chain postcopy: Add vhost-user flag for postcopy and check it vhost-user: Add 'VHOST_USER_POSTCOPY_ADVISE' message libvhost-user: Support sending fds back to qemu libvhost-user: Open userfaultfd postcopy: Allow registering of fd handler vhost+postcopy: Register shared ufd with postcopy vhost+postcopy: Transmit 'listen' to client postcopy+vhost-user: Split set_mem_table for postcopy migration/ram: ramblock_recv_bitmap_test_byte_offset libvhost-user+postcopy: Register new regions with the ufd vhost+postcopy: Send address back to qemu vhost+postcopy: Stash RAMBlock and offset vhost+postcopy: Send requests to source for shared pages vhost+postcopy: Resolve client address postcopy: helper for waking shared postcopy: postcopy_notify_shared_wake vhost+postcopy: Add vhost waker vhost+postcopy: Call wakeups libvhost-user: mprotect & madvises for postcopy vhost-user: Add VHOST_USER_POSTCOPY_END message vhost+postcopy: Wire up POSTCOPY_END notify vhost: Huge page align and merge postcopy: Allow shared memory libvhost-user: Claim support for postcopy postcopy shared docs contrib/libvhost-user/libvhost-user.c | 303 ++++++++++++++++++++++++- contrib/libvhost-user/libvhost-user.h | 11 + docs/devel/migration.rst | 41 ++++ docs/interop/vhost-user.txt | 51 +++++ exec.c | 86 +++++-- hw/virtio/trace-events | 16 +- hw/virtio/vhost-user.c | 411 +++++++++++++++++++++++++++++++++- hw/virtio/vhost.c | 66 +++++- include/exec/cpu-common.h | 4 + migration/migration.c | 6 + migration/migration.h | 4 + migration/postcopy-ram.c | 354 +++++++++++++++++++++++------ migration/postcopy-ram.h | 69 ++++++ migration/ram.c | 5 + migration/ram.h | 1 + migration/savevm.c | 13 ++ migration/trace-events | 6 + trace-events | 3 +- vl.c | 2 + 19 files changed, 1354 insertions(+), 98 deletions(-) Acked-by: Michael S. Tsirkin