qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: peter.maydell@linaro.org, arei.gonglei@huawei.com,
	knut.omang@oracle.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pci_bridge: manually destroy memory regions within PCIBridgeWindows
Date: Wed, 20 Aug 2014 21:48:15 +0200	[thread overview]
Message-ID: <20140820194815.GA28683@redhat.com> (raw)
In-Reply-To: <1408549805-20956-1-git-send-email-pbonzini@redhat.com>

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

  parent reply	other threads:[~2014-08-20 19:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-08-21  1:49 ` Gonglei (Arei)
2014-08-21  8:21 ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140820194815.GA28683@redhat.com \
    --to=mst@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=knut.omang@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).