Received: from eggs.gnu.org ([2001:4830:134:3::10]:37663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCuIE-0002Kl-Lh for qemu-devel@nongnu.org; Wed, 08 Jul 2015 14:42:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCuIB-0005GK-FX for qemu-devel@nongnu.org; Wed, 08 Jul 2015 14:42:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCuIB-0005GD-A0 for qemu-devel@nongnu.org; Wed, 08 Jul 2015 14:41:59 -0400 Date: Wed, 8 Jul 2015 20:41:43 +0200 From: Igor Mammedov Message-ID: <20150708204143.7a808abd@igors-macbook-pro.local> In-Reply-To: <20150708202834-mutt-send-email-mst@redhat.com> References: <1436348808-223033-1-git-send-email-imammedo@redhat.com> <1436348808-223033-8-git-send-email-imammedo@redhat.com> <20150708165837.62857513@igors-macbook-pro.local> <20150708202834-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v3 7/8] memory: extend memory_region_add_subregion() to support error reporting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Peter Maydell , QEMU Developers , Paolo Bonzini On Wed, 8 Jul 2015 20:30:42 +0300 "Michael S. Tsirkin" wrote: > On Wed, Jul 08, 2015 at 04:58:37PM +0200, Igor Mammedov wrote: > > On Wed, 8 Jul 2015 12:09:10 +0100 > > Peter Maydell wrote: > > > > > On 8 July 2015 at 10:46, Igor Mammedov > > > wrote: > > > > extends memory_region_add_subregion() by adding Error** > > > > argument to allow t fail and return a error from it. > > > > > > > > Signed-off-by: Igor Mammedov > > > > 156 files changed, 619 insertions(+), 420 deletions(-) > > > > > > This is a seriously invasive API change and I don't > > > really like it -- reconfiguring the memory region > > > hierarchy should not be an operation which can fail > > > (especially not just adding a subregion!) > > > > > > -- PMM > > > > > > > I'll drop this patch in favor of dedicated > > memory_region_add_subregion_to_hva() API that can fail and return > > error. > > Personally, I think it would be better to have an API that gets > a hva and a callback to invoke before releasing MR. > > It's just a question of taste though. > that won't handle check at subregion_add time if region is available and error out if it's.