qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Igor Mammedov" <imammedo@redhat.com>,
	"Alistair Francis" <alistair.francis@xilinx.com>,
	"Edgar E . Iglesias" <edgar.iglesias@xilinx.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Sascha Silbe" <silbe@linux.vnet.ibm.com>,
	"Alexander Graf" <agraf@suse.de>,
	"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	"Fam Zheng" <famz@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH 0/6] qom: introduce TypeInfo name aliases
Date: Fri, 12 Jan 2018 12:11:19 -0200	[thread overview]
Message-ID: <20180112141119.GF6646@localhost.localdomain> (raw)
In-Reply-To: <395b6cff-e4be-1aa9-48f6-82cdbd9633b9@amsat.org>

On Mon, Jan 08, 2018 at 11:10:37AM -0300, Philippe Mathieu-Daudé wrote:
> Hi Igor,
> 
> On 01/08/2018 09:51 AM, Igor Mammedov wrote:
> [...]
> > Though it seems easy and trivial, I'm a bit concerned about using
> > QOM types for the task though.
> > Also see commit 6acbe4c6f which labels aliases as a bad idea
> > and says that they are there only for compatibility and shouldn't
> > be used.
> > So far I agree with that statement, because it introduces
> > ambiguity in code used internally and more worrying is that
> > this ambiguity will increase user visible ABI (think of '-device_add FOO_ALIAS')
> > that we would need to maintain afterwards.
> > It would be nice to have unified alias API, but I think it should
> > be separate one and limited to the same scope (i.e. compat stuff),
> > and even that won't be easy as different alias impl. we have now
> > have a different needs.
> > 
> > wrt this series targeted usage, I'd prefer that object_new/initialize
> > would use real type names when creating devices as it does currently
> > 
> > FDT linux guest specific names wouldn't seep into device model
> > itself. Firmware (FDT or ACPI) should be separate from device
> > implementation.
> 
> Good point.
> 
> > If really there is need to dynamically scan present devices
> > and build FDT from result, then probably we should introduce
> > interface that devices could implement if necessary.
> > (I was thinking about such possibility for ACPI). But so far
> > it looked to me as too much overhead for what we do now.
> 
> I see, I thought about something similar but TypeInfo.aliases was way
> too simple to not try this series first.
> 
> What about adding a INTERFACE_FDT_DEVICE type (InterfaceInfo) and let
> the FDT devices implement something such:
> 
> typedef struct {
>     /*< private >*/
>     InterfaceClass parent_class;
>     DeviceClass parent_class;
>     /*< public >*/
>     bool (*is_alias)(FDTDeviceIf *dev, const char *name);
>     bool (*set_prop...)(FDTDeviceIf *dev, const char *property, ...);
>     const void *(*get_prop)(FDTDeviceIf *dev, const char *property);

An interface common to FDT devices probably make sense, but I
don't know if the one you suggest above makes sense or not (a
description of each method would be useful to understand what
exactly they would do).

-- 
Eduardo

  reply	other threads:[~2018-01-12 14:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04 14:40 [Qemu-devel] [RFC PATCH 0/6] qom: introduce TypeInfo name aliases Philippe Mathieu-Daudé
2018-01-04 14:40 ` [Qemu-devel] [RFC PATCH 1/6] " Philippe Mathieu-Daudé
2018-01-04 14:40 ` [Qemu-devel] [RFC PATCH 2/6] hw/net/e1000: real device name is 'e1000-82540em', 'e1000' is an alias Philippe Mathieu-Daudé
2018-01-04 16:24   ` Dr. David Alan Gilbert
2018-01-04 16:34     ` Philippe Mathieu-Daudé
2018-01-04 16:41       ` Dr. David Alan Gilbert
2018-01-04 14:40 ` [Qemu-devel] [RFC PATCH 3/6] hw/char/cadence_uart: add FDT aliases Philippe Mathieu-Daudé
2018-01-06  2:19   ` Alistair Francis
2018-01-04 14:40 ` [Qemu-devel] [RFC PATCH 4/6] arm/xlnx-zynq: use FDT names for the Cadence UART Philippe Mathieu-Daudé
2018-01-06  2:20   ` Alistair Francis
2018-01-08 12:54   ` Igor Mammedov
2018-01-08 13:17     ` Thomas Huth
2018-01-08 13:51       ` Philippe Mathieu-Daudé
2018-01-08 14:01         ` Igor Mammedov
2018-01-04 14:40 ` [Qemu-devel] [RFC PATCH 5/6] hw/net/cadence_gem: add FDT names as alias Philippe Mathieu-Daudé
2018-01-06  2:20   ` Alistair Francis
2018-01-04 14:40 ` [Qemu-devel] [RFC PATCH 6/6] hw/arm/xlnx-zynq: use FDT names for the Cadence GEM Philippe Mathieu-Daudé
2018-01-06  2:20   ` Alistair Francis
2018-01-04 19:22 ` [Qemu-devel] [RFC PATCH 0/6] qom: introduce TypeInfo name aliases Eduardo Habkost
2018-01-08 12:51   ` Igor Mammedov
2018-01-08 14:10     ` Philippe Mathieu-Daudé
2018-01-12 14:11       ` Eduardo Habkost [this message]
2018-01-08 16:12     ` Eduardo Habkost

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=20180112141119.GF6646@localhost.localdomain \
    --to=ehabkost@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=alistair.francis@xilinx.com \
    --cc=armbru@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=dgilbert@redhat.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=f4bug@amsat.org \
    --cc=famz@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=silbe@linux.vnet.ibm.com \
    --cc=stefanha@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).