[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH 4/7] target/arm: Make v7M exception e
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH 4/7] target/arm: Make v7M exception entry stack push check MPU |
Date: |
Sat, 3 Feb 2018 13:39:37 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 02/03/2018 01:30 PM, Peter Maydell wrote:
> On 3 February 2018 at 21:21, Richard Henderson
> <address@hidden> wrote:
>> On 01/30/2018 07:02 AM, Peter Maydell wrote:
>>> + if (get_phys_addr(env, addr, MMU_DATA_STORE, mmu_idx, &physaddr,
>>> + &attrs, &prot, &page_size, &fi, NULL)) {
>>
>> Given that you know you're going to call this at least 8 times in a row,
>> probably with all operations on the same page, it is worth querying the qemu
>> tlb first, and when that fails but the lookup succeeds, installing the result
>> into the tlb?
>
> get_phys_addr and address_space_stl_le don't touch the TLB though?
No, get_phys_addr is the primitive that tlb_fill uses.
> We could in theory do a get_phys_addr() once per-page rather than
> doing it all 8 times though, yes.
After I sent that first message I thought perhaps interacting with the proper
TLB is too/overly complicated. We'd get nearly the same results just having a
local 1-entry cache. Something like
pagecache = -1;
stacked_ok =
v7m_stack_write(cpu, frameptr, env->regs[0],
&pagecache, mmu_idx, false) &&
v7m_stack_write(cpu, frameptr + 4, env->regs[1],
&pagecache, mmu_idx, false) &&
...
r~