From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5Eyh-0000mz-Cm for qemu-devel@nongnu.org; Wed, 17 Jun 2015 11:10:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5Eyd-0007BP-0m for qemu-devel@nongnu.org; Wed, 17 Jun 2015 11:10:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5Eyc-00077r-Sh for qemu-devel@nongnu.org; Wed, 17 Jun 2015 11:10:06 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 289B92931FE for ; Wed, 17 Jun 2015 15:10:06 +0000 (UTC) Date: Wed, 17 Jun 2015 17:10:03 +0200 From: "Michael S. Tsirkin" Message-ID: <20150617170704-mutt-send-email-mst@redhat.com> References: <1433776757-61958-1-git-send-email-imammedo@redhat.com> <1433776757-61958-4-git-send-email-imammedo@redhat.com> <5575B58B.50105@redhat.com> <20150608181314.3ab8fc80@nial.brq.redhat.com> <20150608182206-mutt-send-email-mst@redhat.com> <5575CB9F.4060807@redhat.com> <20150609120855.7e19c588@nial.brq.redhat.com> <55812C48.50607@redhat.com> <20150617170437.057db335@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150617170437.057db335@nial.brq.redhat.com> Subject: Re: [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: Paolo Bonzini , qemu-devel@nongnu.org On Wed, Jun 17, 2015 at 05:04:37PM +0200, Igor Mammedov wrote: > On Wed, 17 Jun 2015 10:14:00 +0200 > Paolo Bonzini wrote: > > > > > > > On 09/06/2015 12:08, Igor Mammedov wrote: > > > > > > 3. until #2 is done we can't allow to map another memory region in > > > current flatview at the same range, hence need to keep list of > > > still active HVA ranges so we could check at memory_region_add_subregion() > > > time that new mapping is allowed. => adding "Error **errp" > > > to memory_region_add_subregion() for reporting fail. > > > > No, we cannot do that. memory_region_add_subregion cannot fail. The > > RCU mechanism is transparent. > So what are the options? > > Actually memory_region_add_subregion(cannot fail) will continue to casue problems > in case one of the listeners fails and has no way to propagate error up the stack. > It could be that vhost_set_memory() or kvm_set_memslots() aren't able to allocate > memory for replacement table in low memory conditions and without > way to report back QEMU is left with option to die. mmap reserving memory just adds it to a data structure somewhere within glibc, doesn't it? Looks like it's highly unlikely to fail, so maybe killing QEMU if it does isn't a big deal. > > > > Paolo