On 3 February 2018 at 21:21, Richard Henderson <richard.hender...@linaro.org> 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? We could in theory do a get_phys_addr() once per-page rather than doing it all 8 times though, yes. But yes, I figured I'd write the straightforward code -- M class CPU h/w all runs much slower than the host CPU anyway so we probably have some overhead to play with. If anybody ever complains maybe we can profile it :-) thanks -- PMM