[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/16] tlb_set_page_with_attrs: Take argument sp
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 03/16] tlb_set_page_with_attrs: Take argument specifying AddressSpace to use |
Date: |
Mon, 9 Nov 2015 10:49:42 +0000 |
On 9 November 2015 at 10:44, Paolo Bonzini <address@hidden> wrote:
>
>
> On 05/11/2015 19:15, Peter Maydell wrote:
>> Add an argument to tlb_set_page_with_attrs which allows the target CPU code
>> to tell the core code which AddressSpace to use.
>>
>> The AddressSpace is specified by the index into the array of ASes which
>> were registered with cpu_address_space_init().
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>
> Can it be deduced from the attributes instead? Basically, you would have
>
> int cpu_get_asidx(MemTxAttrs attrs);
>
> in cpu.h, which is called by tlb_set_page_with_attrs.
> cpu_get_phys_page_asidx_debug could also be replaced by
> cpu_get_phys_page_attrs_debug.
For ARM it could, certainly (and as you say, if we go that
way then some of the extra passing around of asidxes collapses,
and in particular we don't need to keep them separately in the
iotlb entries). I wasn't convinced that this would be true for
all possible uses of AddressSpaces.
thanks
-- PMM
[Qemu-devel] [PATCH 14/16] hw/arm/virt: Wire up memory region to CPUs explicitly, Peter Maydell, 2015/11/05
[Qemu-devel] [PATCH 11/16] memory: Add address_space_init_shareable(), Peter Maydell, 2015/11/05