[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycl
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem |
Date: |
Mon, 27 Aug 2012 09:01:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
Il 25/08/2012 09:42, liu ping fan ha scritto:
>> >
>> > I don't see why MMIO dispatch should hold the IDEBus ref rather than the
>> > PCIIDEState.
>> >
> When transfer memory_region_init_io() 3rd para from void* opaque to
> Object* obj, the obj : opaque is not neccessary 1:1 map. For such
> situation, in order to let MemoryRegionOps tell between them, we
> should pass PCIIDEState->bus[0], bus[1] separately.
The rule should be that the obj is the object that you want referenced,
and that should be the PCIIDEState.
But this is anyway moot because it only applies to objects that are
converted to use unlocked dispatch. This likely will not be the case
for IDE.
Paolo
>> > In the case of the PIIX, the BARs are set up by the PCIIDEState in
>> > bmdma_setup_bar (called by bmdma_setup_bar).
>> >
> Supposing we have convert PCIIDEState->bmdma[0]/[1] to Object. And in
> mmio-dispatch, object_ref will impose on bmdma[0/[1], but this can not
> prevent PCIIDEState->refcnt=0, and then the whole object disappear!
- Re: [Qemu-devel] [PATCH 05/10] qdev: finalize of qbus, qdev will not the right place to free children, (continued)
- [Qemu-devel] [PATCH 06/10] qom: expose object_property_del_child, Liu Ping Fan, 2012/08/24
- [Qemu-devel] [PATCH 07/10] unplug: using new intf qdev_delete_subtree in acpi_piix_eject_slot, Liu Ping Fan, 2012/08/24
- [Qemu-devel] [PATCH 09/10] mon: release dev's ref hold by qdev_get_peripheral, Liu Ping Fan, 2012/08/24
- [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem, Liu Ping Fan, 2012/08/24
- Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem, Paolo Bonzini, 2012/08/24
- Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem, Avi Kivity, 2012/08/27
- Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem, Jan Kiszka, 2012/08/27
- Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem, Avi Kivity, 2012/08/27
- Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem, Jan Kiszka, 2012/08/27
- Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem, Avi Kivity, 2012/08/27
- Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem, Jan Kiszka, 2012/08/27
- Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem, Avi Kivity, 2012/08/27