[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/16] exec.c: Add address space index to CPUIOT
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 04/16] exec.c: Add address space index to CPUIOTLBEntry |
Date: |
Fri, 6 Nov 2015 13:45:29 +0000 |
On 6 November 2015 at 13:34, Edgar E. Iglesias <address@hidden> wrote:
> On Thu, Nov 05, 2015 at 06:15:46PM +0000, Peter Maydell wrote:
>> Add the address space index to CPUIOTLBEntry, and use this to pass it
>> to iotlb_to_region(), so that we use the correct AddressSpace when
>> doing IO path lookups.
>
> Hi Peter,
>
> I think this works but eventually when we add support for CPUs behind
> IOMMUs I think things will be easier if we store a pointer to the
> AS instead of an index in the IOTLB. address_space_translate_for_iotlb()
> with IOMMU support may be implemented so that it returns a different
> address space as it walks tha memory hierarchy and translate things.
>
> Do you see any issues with storing pointers to the AS instead of an
> index?
Yeah, we can't deal with arbitrary AddressSpaces here. We need a
CPUAddressSpace, because we use the cached RCU-protected memory_dispatch
pointer. Once you know that you have to be dealing with one of the fixed
CPUAddressSpaces, then you might as well just keep the index rather than
an arbitrary pointer.
thanks
-- PMM
- [Qemu-devel] [PATCH 00/16] Add support for multiple address spaces per CPU and use it for ARM TrustZone, Peter Maydell, 2015/11/05
- [Qemu-devel] [PATCH 05/16] exec.c: Add cpu_get_address_space(), Peter Maydell, 2015/11/05
- [Qemu-devel] [PATCH 16/16] HACK: rearrange the virt memory map to suit OP-TEE, Peter Maydell, 2015/11/05
- [Qemu-devel] [PATCH 12/16] qom/cpu: Add MemoryRegion property, Peter Maydell, 2015/11/05
- [Qemu-devel] [PATCH 13/16] target-arm: Add QOM property for Secure memory region, Peter Maydell, 2015/11/05
- [Qemu-devel] [PATCH 04/16] exec.c: Add address space index to CPUIOTLBEntry, Peter Maydell, 2015/11/05
- [Qemu-devel] [PATCH 02/16] exec.c: Allow target CPUs to define multiple AddressSpaces, Peter Maydell, 2015/11/05
- Re: [Qemu-devel] [PATCH 02/16] exec.c: Allow target CPUs to define multiple AddressSpaces, Paolo Bonzini, 2015/11/09
[Qemu-devel] [PATCH 06/16] include/qom/cpu.h: Add new get_phys_page_asidx_debug method, Peter Maydell, 2015/11/05
[Qemu-devel] [PATCH 07/16] exec.c: Use cpu_get_phys_page_asidx_debug, Peter Maydell, 2015/11/05