* [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows
@ 2014-08-20 15:50 Paolo Bonzini
2014-08-20 19:17 ` Michael S. Tsirkin
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-08-20 15:50 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, arei.gonglei, knut.omang, mst
The regions are destroyed and recreated on configuration space accesses.
We need to destroy them before the containing PCIBridgeWindows object
is freed.
Reported-by: Gonglei <arei.gonglei@huawei.com>
Reported-by: Knut Omang <knut.omang@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/pci/pci_bridge.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index 1307265..40c97b1 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -219,6 +219,12 @@ static void pci_bridge_region_del(PCIBridge *br, PCIBridgeWindows *w)
static void pci_bridge_region_cleanup(PCIBridge *br, PCIBridgeWindows *w)
{
+ object_unparent(OBJECT(&w->alias_io));
+ object_unparent(OBJECT(&w->alias_mem));
+ object_unparent(OBJECT(&w->alias_pref_mem));
+ object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_LO]));
+ object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_HI]));
+ object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_MEM]));
g_free(w);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows
2014-08-20 15:50 [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows Paolo Bonzini
@ 2014-08-20 19:17 ` Michael S. Tsirkin
2014-08-21 8:12 ` Paolo Bonzini
2014-08-20 19:48 ` Michael S. Tsirkin
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Michael S. Tsirkin @ 2014-08-20 19:17 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: peter.maydell, arei.gonglei, knut.omang, qemu-devel
On Wed, Aug 20, 2014 at 05:50:05PM +0200, Paolo Bonzini wrote:
> The regions are destroyed and recreated on configuration space accesses.
> We need to destroy them before the containing PCIBridgeWindows object
> is freed.
>
> Reported-by: Gonglei <arei.gonglei@huawei.com>
> Reported-by: Knut Omang <knut.omang@oracle.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Regression in 2.1? Cc stable?
> ---
> hw/pci/pci_bridge.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
> index 1307265..40c97b1 100644
> --- a/hw/pci/pci_bridge.c
> +++ b/hw/pci/pci_bridge.c
> @@ -219,6 +219,12 @@ static void pci_bridge_region_del(PCIBridge *br, PCIBridgeWindows *w)
>
> static void pci_bridge_region_cleanup(PCIBridge *br, PCIBridgeWindows *w)
> {
> + object_unparent(OBJECT(&w->alias_io));
> + object_unparent(OBJECT(&w->alias_mem));
> + object_unparent(OBJECT(&w->alias_pref_mem));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_LO]));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_HI]));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_MEM]));
> g_free(w);
> }
>
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows
2014-08-20 15:50 [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows Paolo Bonzini
2014-08-20 19:17 ` Michael S. Tsirkin
@ 2014-08-20 19:48 ` Michael S. Tsirkin
2014-08-21 1:49 ` Gonglei (Arei)
2014-08-21 8:21 ` Michael S. Tsirkin
3 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2014-08-20 19:48 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: peter.maydell, arei.gonglei, knut.omang, qemu-devel
On Wed, Aug 20, 2014 at 05:50:05PM +0200, Paolo Bonzini wrote:
> The regions are destroyed and recreated on configuration space accesses.
> We need to destroy them before the containing PCIBridgeWindows object
> is freed.
>
> Reported-by: Gonglei <arei.gonglei@huawei.com>
> Reported-by: Knut Omang <knut.omang@oracle.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Applied, thanks!
> ---
> hw/pci/pci_bridge.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
> index 1307265..40c97b1 100644
> --- a/hw/pci/pci_bridge.c
> +++ b/hw/pci/pci_bridge.c
> @@ -219,6 +219,12 @@ static void pci_bridge_region_del(PCIBridge *br, PCIBridgeWindows *w)
>
> static void pci_bridge_region_cleanup(PCIBridge *br, PCIBridgeWindows *w)
> {
> + object_unparent(OBJECT(&w->alias_io));
> + object_unparent(OBJECT(&w->alias_mem));
> + object_unparent(OBJECT(&w->alias_pref_mem));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_LO]));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_HI]));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_MEM]));
> g_free(w);
> }
>
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows
2014-08-20 15:50 [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows Paolo Bonzini
2014-08-20 19:17 ` Michael S. Tsirkin
2014-08-20 19:48 ` Michael S. Tsirkin
@ 2014-08-21 1:49 ` Gonglei (Arei)
2014-08-21 8:21 ` Michael S. Tsirkin
3 siblings, 0 replies; 6+ messages in thread
From: Gonglei (Arei) @ 2014-08-21 1:49 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: peter.maydell, knut.omang, mst
> -----Original Message-----
> From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo
> Bonzini
> Sent: Wednesday, August 20, 2014 11:50 PM
> To: qemu-devel@nongnu.org
> Cc: peter.maydell@linaro.org; Gonglei (Arei); knut.omang@oracle.com;
> mst@redhat.com
> Subject: [PATCH] pci_bridge: manually destroy memory regions within
> PCIBridgeWindows
>
> The regions are destroyed and recreated on configuration space accesses.
> We need to destroy them before the containing PCIBridgeWindows object
> is freed.
>
> Reported-by: Gonglei <arei.gonglei@huawei.com>
> Reported-by: Knut Omang <knut.omang@oracle.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/pci/pci_bridge.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
> index 1307265..40c97b1 100644
> --- a/hw/pci/pci_bridge.c
> +++ b/hw/pci/pci_bridge.c
> @@ -219,6 +219,12 @@ static void pci_bridge_region_del(PCIBridge *br,
> PCIBridgeWindows *w)
>
> static void pci_bridge_region_cleanup(PCIBridge *br, PCIBridgeWindows *w)
> {
> + object_unparent(OBJECT(&w->alias_io));
> + object_unparent(OBJECT(&w->alias_mem));
> + object_unparent(OBJECT(&w->alias_pref_mem));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_LO]));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_HI]));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_MEM]));
> g_free(w);
> }
>
> --
> 1.8.3.1
Tested-by: Gonglei <arei.gonglei@huawei.com>
Best regards,
-Gonglei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows
2014-08-20 19:17 ` Michael S. Tsirkin
@ 2014-08-21 8:12 ` Paolo Bonzini
0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-08-21 8:12 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: peter.maydell, arei.gonglei, knut.omang, qemu-devel
Il 20/08/2014 21:17, Michael S. Tsirkin ha scritto:
> On Wed, Aug 20, 2014 at 05:50:05PM +0200, Paolo Bonzini wrote:
>> The regions are destroyed and recreated on configuration space accesses.
>> We need to destroy them before the containing PCIBridgeWindows object
>> is freed.
>>
>> Reported-by: Gonglei <arei.gonglei@huawei.com>
>> Reported-by: Knut Omang <knut.omang@oracle.com>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>
>
> Regression in 2.1? Cc stable?
>
>> ---
>> hw/pci/pci_bridge.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
>> index 1307265..40c97b1 100644
>> --- a/hw/pci/pci_bridge.c
>> +++ b/hw/pci/pci_bridge.c
>> @@ -219,6 +219,12 @@ static void pci_bridge_region_del(PCIBridge *br, PCIBridgeWindows *w)
>>
>> static void pci_bridge_region_cleanup(PCIBridge *br, PCIBridgeWindows *w)
>> {
>> + object_unparent(OBJECT(&w->alias_io));
>> + object_unparent(OBJECT(&w->alias_mem));
>> + object_unparent(OBJECT(&w->alias_pref_mem));
>> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_LO]));
>> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_HI]));
>> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_MEM]));
>> g_free(w);
>> }
>>
>> --
>> 1.8.3.1
No, regression from yesterday.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows
2014-08-20 15:50 [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows Paolo Bonzini
` (2 preceding siblings ...)
2014-08-21 1:49 ` Gonglei (Arei)
@ 2014-08-21 8:21 ` Michael S. Tsirkin
3 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2014-08-21 8:21 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: peter.maydell, arei.gonglei, knut.omang, qemu-devel
On Wed, Aug 20, 2014 at 05:50:05PM +0200, Paolo Bonzini wrote:
> The regions are destroyed and recreated on configuration space accesses.
> We need to destroy them before the containing PCIBridgeWindows object
> is freed.
>
> Reported-by: Gonglei <arei.gonglei@huawei.com>
> Reported-by: Knut Omang <knut.omang@oracle.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Applied in my tree.
> ---
> hw/pci/pci_bridge.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
> index 1307265..40c97b1 100644
> --- a/hw/pci/pci_bridge.c
> +++ b/hw/pci/pci_bridge.c
> @@ -219,6 +219,12 @@ static void pci_bridge_region_del(PCIBridge *br, PCIBridgeWindows *w)
>
> static void pci_bridge_region_cleanup(PCIBridge *br, PCIBridgeWindows *w)
> {
> + object_unparent(OBJECT(&w->alias_io));
> + object_unparent(OBJECT(&w->alias_mem));
> + object_unparent(OBJECT(&w->alias_pref_mem));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_LO]));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_HI]));
> + object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_MEM]));
> g_free(w);
> }
>
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-08-21 8:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 15:50 [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows Paolo Bonzini
2014-08-20 19:17 ` Michael S. Tsirkin
2014-08-21 8:12 ` Paolo Bonzini
2014-08-20 19:48 ` Michael S. Tsirkin
2014-08-21 1:49 ` Gonglei (Arei)
2014-08-21 8:21 ` Michael S. Tsirkin
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.