qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v2 4/6] hostmem: return recreated MemoryRegion if


From: Igor Mammedov
Subject: Re: [Qemu-devel] [RFC v2 4/6] hostmem: return recreated MemoryRegion if current can't be reused
Date: Mon, 8 Jun 2015 18:25:00 +0200

On Mon, 08 Jun 2015 17:30:20 +0200
Paolo Bonzini <address@hidden> wrote:

> 
> 
> On 08/06/2015 17:19, Igor Mammedov wrote:
> >  MemoryRegion *
> >  host_memory_backend_get_memory(HostMemoryBackend *backend, Error **errp)
> >  {
> > +    UserCreatableClass *ucc = USER_CREATABLE_GET_CLASS(backend);
> > +
> > +    if (memory_region_is_hva_mapped(&backend->mr)) {
> > +        object_unparent(OBJECT(&backend->mr));
> > +        ucc->complete(USER_CREATABLE(backend), errp);
> > +    }
> 
> I'm not sure I understand this, and the commit message... doesn't help.
> 
> Is it for the case where you unplug memory and then reuse the old
> backend?
yes

>  Can we just outlaw this, forcing each memory backend to be
> used only once?
to outlaw it gracefully without asserting QEMU during hotplug
user should be able to detect that it's outlawed i.e. use
memory_region_is_hva_mapped(), but yes we can.

> 
> Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]