Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-07 Thread Andreas Färber
Am 07.06.2013 03:03, schrieb Paolo Bonzini: Il 05/06/2013 05:50, Andreas Färber ha scritto: Also I notice some patches are accessing parent fields directly - please use BUS(), PCI_DEVICE() etc. to hide this. I'm always using them. For example: +static void

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-07 Thread Peter Crosthwaite
Hi, On Jun 7, 2013 11:04 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 05/06/2013 05:50, Andreas Färber ha scritto: Am 04.06.2013 20:51, schrieb Paolo Bonzini: This series changes all PCI devices (the sole to support hotplug _and_ use MemoryRegions) to do memory_region_del_subregion at

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-07 Thread Paolo Bonzini
Il 07/06/2013 03:45, Andreas Färber ha scritto: Am 07.06.2013 03:03, schrieb Paolo Bonzini: Il 05/06/2013 05:50, Andreas Färber ha scritto: Also I notice some patches are accessing parent fields directly - please use BUS(), PCI_DEVICE() etc. to hide this. I'm always using them. For example:

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-07 Thread Andreas Färber
Hi Peter, Am 07.06.2013 10:41, schrieb Peter Crosthwaite: I have a series that fixes all qom cast macros for all PCI devices tree wide. Can post. Qom cast macros added as needed. Sounds promising! I just CC'ed you on my ISA series v2, which touches on PCI_BUS() in the final patch, dropping

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-06 Thread Paolo Bonzini
Il 05/06/2013 05:50, Andreas Färber ha scritto: Am 04.06.2013 20:51, schrieb Paolo Bonzini: This series changes all PCI devices (the sole to support hotplug _and_ use MemoryRegions) to do memory_region_del_subregion at unrealize time, and memory_region_destroy at instance_finalize time.

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Andreas Färber
Am 04.06.2013 20:51, schrieb Paolo Bonzini: This series changes all PCI devices (the sole to support hotplug _and_ use MemoryRegions) to do memory_region_del_subregion at unrealize time, and memory_region_destroy at instance_finalize time. The general idea looks good. Could you please

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 11:50:52AM +0200, Andreas Färber wrote: Am 04.06.2013 20:51, schrieb Paolo Bonzini: This series changes all PCI devices (the sole to support hotplug _and_ use MemoryRegions) to do memory_region_del_subregion at unrealize time, and memory_region_destroy at

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Andreas Färber
Am 05.06.2013 13:10, schrieb Michael S. Tsirkin: On Wed, Jun 05, 2013 at 11:50:52AM +0200, Andreas Färber wrote: Am 04.06.2013 20:51, schrieb Paolo Bonzini: This series changes all PCI devices (the sole to support hotplug _and_ use MemoryRegions) to do memory_region_del_subregion at unrealize

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Peter Maydell
On 5 June 2013 12:10, Michael S. Tsirkin m...@redhat.com wrote: unrealize is not a word in english: The OED says: # unˈrealize, v. # trans. To make unreal; to deprive of reality. with the earliest citation from 1804. so if it seems like the best term (and it does make clear the pairing with

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 12:38:35PM +0100, Peter Maydell wrote: On 5 June 2013 12:10, Michael S. Tsirkin m...@redhat.com wrote: unrealize is not a word in english: The OED says: # unˈrealize, v. # trans. To make unreal; to deprive of reality. with the earliest citation from 1804. so

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 01:32:17PM +0200, Andreas Färber wrote: Am 05.06.2013 13:10, schrieb Michael S. Tsirkin: On Wed, Jun 05, 2013 at 11:50:52AM +0200, Andreas Färber wrote: Am 04.06.2013 20:51, schrieb Paolo Bonzini: This series changes all PCI devices (the sole to support hotplug

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 12:38:35PM +0100, Peter Maydell wrote: On 5 June 2013 12:10, Michael S. Tsirkin m...@redhat.com wrote: unrealize is not a word in english: The OED says: # unˈrealize, v. # trans. To make unreal; to deprive of reality. with the earliest citation from 1804. So

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Andreas Färber
Am 05.06.2013 14:06, schrieb Michael S. Tsirkin: On Wed, Jun 05, 2013 at 01:32:17PM +0200, Andreas Färber wrote: Am 05.06.2013 13:10, schrieb Michael S. Tsirkin: On Wed, Jun 05, 2013 at 11:50:52AM +0200, Andreas Färber wrote: Am 04.06.2013 20:51, schrieb Paolo Bonzini: This series changes all

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 02:23:03PM +0200, Andreas Färber wrote: Am 05.06.2013 14:06, schrieb Michael S. Tsirkin: On Wed, Jun 05, 2013 at 01:32:17PM +0200, Andreas Färber wrote: Am 05.06.2013 13:10, schrieb Michael S. Tsirkin: On Wed, Jun 05, 2013 at 11:50:52AM +0200, Andreas Färber wrote:

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Andreas Färber
Am 05.06.2013 14:36, schrieb Michael S. Tsirkin: Anyway, my point was, when moving stuff out of exit, we should also change the signature to the new one - DeviceState* and (unused) Error**. Then we're getting closer to removing the old exit field, and at that point renaming individual hooks -

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Anthony Liguori
Michael S. Tsirkin m...@redhat.com writes: On Wed, Jun 05, 2013 at 11:50:52AM +0200, Andreas Färber wrote: Am 04.06.2013 20:51, schrieb Paolo Bonzini: This series changes all PCI devices (the sole to support hotplug _and_ use MemoryRegions) to do memory_region_del_subregion at unrealize

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 07:53:05AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Wed, Jun 05, 2013 at 11:50:52AM +0200, Andreas Färber wrote: Am 04.06.2013 20:51, schrieb Paolo Bonzini: This series changes all PCI devices (the sole to support hotplug

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Anthony Liguori
Paolo Bonzini pbonz...@redhat.com writes: QOM splits the destruction of a device in two phases: - unrealize, also known as exit from qdev times, should isolate the device from the guest. After unrealize returns, the guest should not be able to issue new requests. - instance_finalize

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2013 at 10:33:05AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Wed, Jun 05, 2013 at 07:53:05AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Wed, Jun 05, 2013 at 11:50:52AM +0200, Andreas Färber wrote: Am

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Anthony Liguori
Michael S. Tsirkin m...@redhat.com writes: On Wed, Jun 05, 2013 at 07:53:05AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Wed, Jun 05, 2013 at 11:50:52AM +0200, Andreas Färber wrote: Am 04.06.2013 20:51, schrieb Paolo Bonzini: This series changes all PCI

Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-05 Thread Peter Maydell
On 5 June 2013 16:44, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jun 05, 2013 at 10:33:05AM -0500, Anthony Liguori wrote: finalize is the standard name of the hook that gets called before garbage collection as Andreas previously pointed out. I am simply asking for function names to

[Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize

2013-06-04 Thread Paolo Bonzini
QOM splits the destruction of a device in two phases: - unrealize, also known as exit from qdev times, should isolate the device from the guest. After unrealize returns, the guest should not be able to issue new requests. - instance_finalize will reclaim the memory. This is only called