qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 08/27] dimm: implement dimm device abstraction


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH 08/27] dimm: implement dimm device abstraction
Date: Mon, 25 Nov 2013 16:10:52 +0100

On Mon, 25 Nov 2013 13:57:17 +0100
Paolo Bonzini <address@hidden> wrote:

> Il 21/11/2013 03:38, Igor Mammedov ha scritto:
> > +static void dimm_initfn(Object *obj)
> > +{
> > +    object_property_add(obj, "memdev", "string", dimm_get_memdev,
> > +                        dimm_set_memdev, NULL, NULL, NULL);
> 
> Perhaps, instead of relying on memory_region_owner, you could have
> separate pointers for the MemoryBackend* and MemoryRegion*.  Then this
> property could be a link<MemoryBackend> type (it looks like a link, and
> quacks like a link).

In initial implementation I had 'backend' property which was exactly
just link<> to backend.

but when adding dimm (CLI/Moinitor), I had to specify full QOM path
to backend which looked like -device dimm,id=foo1,backend=/backend/memdev[foo2]
which was ugly. So I moved to a currently used model by netdev
and replaced it with 'memdev' property.

But since then backend path has changed to /backend/memdev/foo
so I guess it should be possible to use backend=foo for partial
path resolving should yield object without full path.
The only downside would be backend instance name in global name space.

> Paolo
> 
> > +    object_property_add(obj, "size", "int", dimm_get_size,
> > +                        NULL, NULL, NULL, NULL);
> > +}
> > +
> 




reply via email to

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