qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]