[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [RFC PATCH 05/15] spapr_pci: add PHB unrealize
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-ppc] [RFC PATCH 05/15] spapr_pci: add PHB unrealize |
Date: |
Mon, 04 May 2015 11:29:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 01/05/2015 03:18, Michael Roth wrote:
> Sorry, I mixed up memory regions with memory region alias. Memory region
> aliases do a memory_region_ref() on the original MR, similar to
> memory_region_add_subregion(), so that's what ends up creating the
> reference to the owner/PHB.
>
> So I think I do need to object_unparent() the 2 MR aliases in realize
> (otherwise the PHB doesn't get finalized), but everything else can
> get moved to instance_finalize() as you suggested and that seems to
> do the trick.
Yes, unparenting the aliases in unrealize is okay and in fact may be
required to avoid a leak. Patching docs/memory.txt to point it out
would be great. :)
Paolo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-ppc] [RFC PATCH 05/15] spapr_pci: add PHB unrealize,
Paolo Bonzini <=