[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/27] add memdev backend infrastructure
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 07/27] add memdev backend infrastructure |
Date: |
Wed, 27 Nov 2013 16:57:59 +0100 |
On Wed, 27 Nov 2013 16:21:23 +0100
Paolo Bonzini <address@hidden> wrote:
> Il 27/11/2013 15:37, Igor Mammedov ha scritto:
> > It looks like "realize" for -object / object-add implemented via
> > an interface.
>
> It does---but without unrealize and with the additional get_base_path.
>
> > Maybe it should be renamed from QOMCommandLineIface to QOMRealizeIface
> > and s/complete/realize/ so anyone who knows about Device.realize would
> > get meaning without digging in complete() implementations.
>
> There is an important difference; realize is an internal method in
> Device, the external interface is the property. So perhaps it's the
> other way round; if Device implements QOMCommandLineIface you could
> start creating devices with -object.
>
> > Alternative would be to behave just like Rng/Tpm do, i.e. use -object
> > to do late initialization in a backend user (DimmDevice.realize).
> > Draw back of it would be user won't get error during the first command
> > "object-add" and only will get error when creating DimmDevice calling
> > "device_add".
>
> That's also a possibility. But again, maybe it's the other way round
> and Rng/Tpm could enjoy better error handling if we add the interface.
Sure, I'll try to do as you described, it's much better to get error
earlier and from command/object that throws it than via proxy.
Thanks for suggestion, looking at netdev-add I even haven't thought
about using -object.
> Paolo
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, (continued)
[Qemu-devel] [PATCH 06/27] get reference to /backend container via qemu_get_backend(), Igor Mammedov, 2013/11/20
[Qemu-devel] [PATCH 07/27] add memdev backend infrastructure, Igor Mammedov, 2013/11/20
Re: [Qemu-devel] [PATCH 07/27] add memdev backend infrastructure, Eric Blake, 2013/11/27
[Qemu-devel] [PATCH 08/27] dimm: implement dimm device abstraction, Igor Mammedov, 2013/11/20
[Qemu-devel] [PATCH 09/27] dimm: map DimmDevice into DimBus provided address space, Igor Mammedov, 2013/11/20
[Qemu-devel] [PATCH 10/27] dimm: add busy slot check and slot auto-allocation, Igor Mammedov, 2013/11/20
[Qemu-devel] [PATCH 11/27] dimm: add busy address check and address auto-allocation, Igor Mammedov, 2013/11/20
[Qemu-devel] [PATCH 13/27] acpi: memory hotplug ACPI hardware implementation, Igor Mammedov, 2013/11/20