[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v0 4/8] object: create default canonical paths for
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC v0 4/8] object: create default canonical paths for orphans |
Date: |
Wed, 13 Jun 2012 12:08:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
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
- [Qemu-devel] [RFC v0 0/8] QOMify AXI stream for Xilinx AXI ethernet/DMA, Peter A. G. Crosthwaite, 2012/06/13
- [Qemu-devel] [RFC v0 1/8] qom: revamp interfaces, Peter A. G. Crosthwaite, 2012/06/13
- [Qemu-devel] [RFC v0 2/8] xilinx: remove PROP_PTR properties, Peter A. G. Crosthwaite, 2012/06/13
- [Qemu-devel] [RFC v0 3/8] xilinx_axidma: Added missing TypeInfo, Peter A. G. Crosthwaite, 2012/06/13
- [Qemu-devel] [RFC v0 4/8] object: create default canonical paths for orphans, Peter A. G. Crosthwaite, 2012/06/13
- Re: [Qemu-devel] [RFC v0 4/8] object: create default canonical paths for orphans,
Paolo Bonzini <=
- [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Peter A. G. Crosthwaite, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Paolo Bonzini, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Avi Kivity, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Paolo Bonzini, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Avi Kivity, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Paolo Bonzini, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Avi Kivity, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Anthony Liguori, 2012/06/13
[Qemu-devel] [RFC v0 7/8] petalogix_ml605_mmu: fixed qdev create for dma, Peter A. G. Crosthwaite, 2012/06/13
[Qemu-devel] [RFC v0 8/8] axidma: renamed interconnect to axi-stream, Peter A. G. Crosthwaite, 2012/06/13