On Wed, 26 Feb 2014 11:33:30 +0100 Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 26/02/2014 10:10, Igor Mammedov ha scritto: > > if we assume that NUMA policies apply to every hostmem derived backend, > > then we could realize() approach used by DEVICE. i.e. > > set NUMA policies in hostmem.c:hostmemory_backend_memory_init() > > > > Add parent_complete field to ram-backend class and store there parent's > > complete pointer. Then we can do: > > > > ram_backend_memory_init(UserCreatable *uc, Error **errp) { > > memory_region_init_ram(); > > ... > > MEMORY_BACKEND_RAM_CLASS(uc)->parent_complete(uc, errp); > > ... > > } > > > > The problem is that some backends might not be handled the same way. > For example, not all backends might produce a single void*/size_t pair > for the entire region. Think of a "composite" backend that produces a > large memory region from two smaller ones. I'd prefer to keep backends simple, with 1:1 mapping to memory regions. Is there a need in composite one or something similar? > > Paolo