[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v3 7/8] memory: extend memory_region_add_subregion
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [RFC v3 7/8] memory: extend memory_region_add_subregion() to support error reporting |
Date: |
Thu, 9 Jul 2015 09:58:23 +0300 |
On Wed, Jul 08, 2015 at 08:41:43PM +0200, Igor Mammedov wrote:
> On Wed, 8 Jul 2015 20:30:42 +0300
> "Michael S. Tsirkin" <address@hidden> 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 <address@hidden> wrote:
> > >
> > > > On 8 July 2015 at 10:46, Igor Mammedov <address@hidden>
> > > > 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 <address@hidden>
> > > > > 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.
The point is that you request a hva range *before* adding regions.
Then pass it in.
--
MST
Re: [Qemu-devel] [RFC v3 0/8] Fix QEMU crash during memory hotplug with vhost=on, Michael S. Tsirkin, 2015/07/08