From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCtBM-0002re-Oi for qemu-devel@nongnu.org; Wed, 08 Jul 2015 13:30:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCtBG-0002yE-Jb for qemu-devel@nongnu.org; Wed, 08 Jul 2015 13:30:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCtBG-0002y2-1m for qemu-devel@nongnu.org; Wed, 08 Jul 2015 13:30:46 -0400 Date: Wed, 8 Jul 2015 20:30:42 +0300 From: "Michael S. Tsirkin" Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150708165837.62857513@igors-macbook-pro.local> 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: Igor Mammedov Cc: Peter Maydell , QEMU Developers , Paolo Bonzini 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. -- MST