All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Peter A. G. Crosthwaite" <peter.crosthwaite@petalogix.com>
Cc: peter.maydell@linaro.org, aliguori@us.ibm.com,
	qemu-devel@nongnu.org, paul@codesourcery.com,
	edgar.iglesias@gmail.com, afaerber@suse.de,
	john.williams@petalogix.com, avi@redhat.com
Subject: Re: [Qemu-devel] [RFC v0 4/8] object: create default canonical paths for orphans
Date: Wed, 13 Jun 2012 12:08:25 +0200	[thread overview]
Message-ID: <4FD86699.8040105@redhat.com> (raw)
In-Reply-To: <74685dbe793dcda72f02a4ef8f8fae68992dd813.1339578989.git.peter.crosthwaite@petalogix.com>

Il 13/06/2012 11:38, Peter A. G. Crosthwaite ha scritto:
> Create a default canonical path for an object which doesnt have one. This
> is a workaround for a bug probably buried deep with qdev as objects should
> always have valid canonical paths, but the need came about with the
> petalogix_ml605_mmu platform, the ethernet and dma devices as created by
> qdev have bogus paths (apparently).

We already do this in qdev_init_nofail:

    if (!OBJECT(dev)->parent) {
        static int unattached_count = 0;
        gchar *name = g_strdup_printf("device[%d]", unattached_count++);

        object_property_add_child(container_get(qdev_get_machine(),
                                                "/unattached"),
                                  name, OBJECT(dev), NULL);
        g_free(name);
    }

Probably we should move this piece to a function qdev_attach, so that
you can call it before object_property_set_link.

Alternatively, we could make object_property_set_link bypass the
canonical paths and write the pointer directly, but I think this would
be bad.

Paolo

  reply	other threads:[~2012-06-13 10:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13  9:38 [Qemu-devel] [RFC v0 0/8] QOMify AXI stream for Xilinx AXI ethernet/DMA Peter A. G. Crosthwaite
2012-06-13  9:38 ` [Qemu-devel] [RFC v0 1/8] qom: revamp interfaces Peter A. G. Crosthwaite
2012-06-13  9:38 ` [Qemu-devel] [RFC v0 2/8] xilinx: remove PROP_PTR properties Peter A. G. Crosthwaite
2012-06-13  9:38 ` [Qemu-devel] [RFC v0 3/8] xilinx_axidma: Added missing TypeInfo Peter A. G. Crosthwaite
2012-06-13 10:05   ` Paolo Bonzini
2012-06-13  9:38 ` [Qemu-devel] [RFC v0 4/8] object: create default canonical paths for orphans Peter A. G. Crosthwaite
2012-06-13 10:08   ` Paolo Bonzini [this message]
2012-06-13  9:38 ` [Qemu-devel] [RFC v0 5/8] object: make interfaces concrete Peter A. G. Crosthwaite
2012-06-13 10:03   ` Paolo Bonzini
2012-06-13 10:28     ` Andreas Färber
2012-06-13 10:42       ` Paolo Bonzini
2012-06-13 12:59         ` Andreas Färber
2012-06-13 13:02           ` Paolo Bonzini
2012-06-13 13:30             ` Anthony Liguori
2012-06-13 13:33               ` Paolo Bonzini
2012-06-13 13:36                 ` Anthony Liguori
2012-06-13 13:38                   ` Paolo Bonzini
2012-06-13 13:50                     ` Anthony Liguori
2012-06-13 20:22                       ` Edgar E. Iglesias
2012-06-13  9:38 ` [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links Peter A. G. Crosthwaite
2012-06-13 10:41   ` Paolo Bonzini
2012-06-13 10:55     ` Avi Kivity
2012-06-13 10:59       ` Paolo Bonzini
2012-06-13 11:02         ` Avi Kivity
2012-06-13 11:05           ` Paolo Bonzini
2012-06-13 11:08             ` Avi Kivity
2012-06-13 13:55     ` Anthony Liguori
2012-06-13  9:38 ` [Qemu-devel] [RFC v0 7/8] petalogix_ml605_mmu: fixed qdev create for dma Peter A. G. Crosthwaite
2012-06-13  9:38 ` [Qemu-devel] [RFC v0 8/8] axidma: renamed interconnect to axi-stream Peter A. G. Crosthwaite

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=4FD86699.8040105@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=john.williams@petalogix.com \
    --cc=paul@codesourcery.com \
    --cc=peter.crosthwaite@petalogix.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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.