Received: from eggs.gnu.org ([2001:4830:134:3::10]:50861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5EtR-0006E6-4G for qemu-devel@nongnu.org; Wed, 17 Jun 2015 11:04:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5EtN-0004BJ-Oo for qemu-devel@nongnu.org; Wed, 17 Jun 2015 11:04:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5EtN-0004BB-JE for qemu-devel@nongnu.org; Wed, 17 Jun 2015 11:04:41 -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 33E773702F4 for ; Wed, 17 Jun 2015 15:04:41 +0000 (UTC) Date: Wed, 17 Jun 2015 17:04:37 +0200 From: Igor Mammedov Message-ID: <20150617170437.057db335@nial.brq.redhat.com> In-Reply-To: <55812C48.50607@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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Paolo Bonzini Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" 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. > > Paolo