From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0AEM-00006L-Ki for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:05:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0AEH-0007Id-Lh for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:05:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0AEH-0007IL-G0 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:05:17 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id E5AE4B8BA0 for ; Wed, 3 Jun 2015 15:05:16 +0000 (UTC) Date: Wed, 3 Jun 2015 17:05:14 +0200 From: "Michael S. Tsirkin" Message-ID: <20150603150514.GA13919@redhat.com> References: <1433334157-37665-1-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433334157-37665-1-git-send-email-imammedo@redhat.com> Subject: Re: [Qemu-devel] [RFC 0/2] Fix QEMU crash during memory hotplug with vhost=on List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: pbonzini@redhat.com, qemu-devel@nongnu.org On Wed, Jun 03, 2015 at 02:22:35PM +0200, Igor Mammedov wrote: > When more than ~50 pc-dimm devices are hotplugged with > vhost enabled, QEMU will assert in vhost vhost_commit() > due to backend refusing to accept too many memory ranges. > > Series introduces Reserved HVA MemoryRegion container > where all hotplugged memory is remapped and passes > the single container range to vhost instead of multiple > memory ranges for each hotlugged pc-dimm device. > > It's alternative approach to increasing backend supported > memory regions limit since what I've come up with > backend side approach is quite a bit more code so far. > > With this approach it would be possible to extend it to > initial memory later and provide a single range for all > RAM to vhost, which should speed up its hot-path by replacing > current GPA<->HVA lookup loop with offset calculation. I'm a bit too busy for a thorough review so it'll take a bit of time. From a quick look, it's nice. Acked-by: Michael S. Tsirkin > Igor Mammedov (2): > memory: introduce MemoryRegion container with reserved HVA range > pc: fix QEMU crashing when more than ~50 memory hotplugged > > exec.c | 13 +++++++++++ > hw/i386/pc.c | 4 ++-- > hw/virtio/vhost.c | 15 ++++++++++--- > include/exec/cpu-common.h | 1 + > include/exec/memory.h | 42 ++++++++++++++++++++++++++++++++++-- > memory.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++ > 6 files changed, 123 insertions(+), 7 deletions(-) > > -- > 1.8.3.1