Re: [Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls

2013-07-02 Thread Paolo Bonzini
Il 02/07/2013 11:31, Jan Kiszka ha scritto: > On 2013-07-02 11:28, Paolo Bonzini wrote: >> Il 02/07/2013 10:36, Jan Kiszka ha scritto: >>> Hmm, two solutions for one problem - can we improve this in the next >>> round? > > Sure, I can adapt the hw/acpi/piix4.c to use ifs in the sam

Re: [Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls

2013-07-02 Thread Jan Kiszka
On 2013-07-02 11:28, Paolo Bonzini wrote: > Il 02/07/2013 10:36, Jan Kiszka ha scritto: >> Hmm, two solutions for one problem - can we improve this in the next >> round? Sure, I can adapt the hw/acpi/piix4.c to use ifs in the same style as hw/isa/lpc_ich9.c (I find the code

Re: [Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls

2013-07-02 Thread Paolo Bonzini
Il 02/07/2013 10:36, Jan Kiszka ha scritto: >>> >> Hmm, two solutions for one problem - can we improve this in the next >>> >> round? >> > >> > Sure, I can adapt the hw/acpi/piix4.c to use ifs in the same style as >> > hw/isa/lpc_ich9.c (I find the code easier to read). > I was more referring to

Re: [Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls

2013-07-02 Thread Jan Kiszka
On 2013-07-02 10:18, Paolo Bonzini wrote: > Il 02/07/2013 09:11, Jan Kiszka ha scritto: >> On 2013-07-02 08:42, Paolo Bonzini wrote: >>> Il 01/07/2013 20:33, Jan Kiszka ha scritto: On 2013-06-28 18:58, Paolo Bonzini wrote: > Add ref/unref calls at the following places: > > - places

Re: [Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls

2013-07-02 Thread Paolo Bonzini
Il 02/07/2013 09:11, Jan Kiszka ha scritto: > On 2013-07-02 08:42, Paolo Bonzini wrote: >> Il 01/07/2013 20:33, Jan Kiszka ha scritto: >>> On 2013-06-28 18:58, Paolo Bonzini wrote: Add ref/unref calls at the following places: - places where memory regions are stashed by a listener an

Re: [Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls

2013-07-02 Thread Jan Kiszka
On 2013-07-02 08:42, Paolo Bonzini wrote: > Il 01/07/2013 20:33, Jan Kiszka ha scritto: >> On 2013-06-28 18:58, Paolo Bonzini wrote: >>> Add ref/unref calls at the following places: >>> >>> - places where memory regions are stashed by a listener and >>> used outside the BQL (including in Xen or K

Re: [Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls

2013-07-01 Thread Paolo Bonzini
Il 01/07/2013 20:33, Jan Kiszka ha scritto: > On 2013-06-28 18:58, Paolo Bonzini wrote: >> Add ref/unref calls at the following places: >> >> - places where memory regions are stashed by a listener and >> used outside the BQL (including in Xen or KVM). >> >> - memory_region_find callsites > > Yo

Re: [Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls

2013-07-01 Thread Jan Kiszka
On 2013-06-28 18:58, Paolo Bonzini wrote: > Add ref/unref calls at the following places: > > - places where memory regions are stashed by a listener and > used outside the BQL (including in Xen or KVM). > > - memory_region_find callsites You missed some recently added ones. Check hw/acpi/piix4

[Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls

2013-06-28 Thread Paolo Bonzini
Add ref/unref calls at the following places: - places where memory regions are stashed by a listener and used outside the BQL (including in Xen or KVM). - memory_region_find callsites - creation of aliases and containers (only the aliased/contained region gets a reference to avoid loops) -