On Wed, Jul 08, 2015 at 04:58:37PM +0200, Igor Mammedov wrote: > On Wed, 8 Jul 2015 12:09:10 +0100 > Peter Maydell <peter.mayd...@linaro.org> wrote: > > > On 8 July 2015 at 10:46, Igor Mammedov <imamm...@redhat.com> 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 <imamm...@redhat.com> > > > 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