On Mon, 08 Jun 2015 17:30:20 +0200 Paolo Bonzini <pbonz...@redhat.com> 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