All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Liviu Ionescu <ilg@livius.net>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: QEMU Developers <Qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors
Date: Wed, 24 Jun 2015 15:41:09 +0200	[thread overview]
Message-ID: <558AB375.8090309@suse.de> (raw)
In-Reply-To: <558A7D9B.8050306@redhat.com>

Am 24.06.2015 um 11:51 schrieb Paolo Bonzini:
> On 24/06/2015 11:29, Liviu Ionescu wrote:
>> ok, I managed to restructure my code to get rid of the explicit
>> constructor. :-)
>>
>> I also avoided properties aliases, and did prop setting in two steps,
>> in machine init I set props in MCU, and from here I manually set them
>> in specific peripherals, after they are created. less efficient then
>> aliases, but functional.
>>
>> however, there is one aspect that I'm not compliant with your
>> requirements: I'm still creating objects in realize(), since many of
>> my objects have dynamic content. for example MCUs have different
>> number of GPIOs, it is possible to create all of them in init and
>> then map only the used ones, but to me this looks sub-optimal.
> 
> I think this is okay.

It's acceptable (Error **errp available for reporting) but not ideal (no
way to inspect and set properties on the created child devices).

Therefore my pointer to dynamic properties, which we made Alexey use for
ppc's XICS for a similar problem of N child devices.

Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)

  reply	other threads:[~2015-06-24 13:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 10:48 [Qemu-devel] [RFC] QDev explicit constructors & destructors Liviu Ionescu
2015-06-15 11:13 ` Liviu Ionescu
2015-06-15 13:35 ` Liviu Ionescu
2015-06-22 20:48   ` Liviu Ionescu
2015-06-23  7:47     ` Markus Armbruster
2015-06-23  9:12       ` Liviu Ionescu
2015-06-23 10:39   ` Andreas Färber
2015-06-23 12:58     ` Liviu Ionescu
2015-06-23 14:25       ` Andreas Färber
2015-06-23 16:15         ` Liviu Ionescu
2015-06-23 18:31         ` Peter Crosthwaite
2015-06-23 19:10           ` Liviu Ionescu
2015-06-23 20:57             ` Peter Crosthwaite
2015-06-23 21:24               ` Liviu Ionescu
2015-06-23 19:27           ` Andreas Färber
2015-06-23 20:10           ` Liviu Ionescu
2015-06-24  7:30             ` Liviu Ionescu
2015-06-24  8:29               ` Peter Crosthwaite
2015-06-24  9:29                 ` Liviu Ionescu
2015-06-24  9:51                   ` Paolo Bonzini
2015-06-24 13:41                     ` Andreas Färber [this message]
2015-06-24 13:50                   ` Andreas Färber
2015-06-24 14:11                     ` Liviu Ionescu
2015-06-24 14:18                       ` Andreas Färber
2015-06-24 14:39                         ` Liviu Ionescu
2015-06-24 14:41                           ` Andreas Färber
2015-06-24 20:14                       ` Liviu Ionescu
2015-06-24  8:51             ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=558AB375.8090309@suse.de \
    --to=afaerber@suse.de \
    --cc=Qemu-devel@nongnu.org \
    --cc=ilg@livius.net \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.