[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2 3/6] memory: add memory_region
From: |
Peter Maydell |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2 3/6] memory: add memory_region_to_address() |
Date: |
Wed, 17 Apr 2013 10:14:26 +0100 |
On 17 April 2013 01:10, Scott Wood <address@hidden> wrote:
> On 04/16/2013 03:25:50 AM, Peter Maydell wrote:
>> A MemoryRegion can appear in more than one AddressSpace (or none at all),
>> so I don't think this is a very clearly defined API to put in the
>> memory API itself. (It's ok to make that kind of assumption as a user
>> of the memory APIs for particular cases, eg in how a memory listener
>> callback function behaves. But we shouldn't be baking those assumptions
>> into new API functions.)
> I'm not sure how it's different from memory_region_to_address_space in that
> regard, other than its ability to gracefully handle the "or none at all"
> case.
memory_region_to_address_space() is an internal function used by
a couple of functions -- it's passed "a top level (ie parentless)
region", not an arbitrary region [semantically, anyway].
> How does it work to be in more than one AddressSpace, if there's a parent
> chain? More than one "as" with the same "as->root"? Or are you referring
> to aliases?
Yes, I had aliases in mind. Ignoring aliases isn't really very
doable since you can't control whether somebody else has taken
an alias of you.
thanks
-- PMM
- [Qemu-ppc] [RFC PATCH v2 0/6] kvm/openpic: in-kernel irqchip, Scott Wood, 2013/04/15
- [Qemu-ppc] [RFC PATCH v2 1/6] kvm: update linux-headers, Scott Wood, 2013/04/15
- [Qemu-ppc] [RFC PATCH v2 4/6] openpic: factor out some common defines into openpic.h, Scott Wood, 2013/04/15
- [Qemu-ppc] [RFC PATCH v2 5/6] PPC: e500: factor out mpic init code, Scott Wood, 2013/04/15
- [Qemu-ppc] [RFC PATCH v2 6/6] kvm/openpic: in-kernel mpic support, Scott Wood, 2013/04/15