On 01/12/2018 04:43 PM, Laurent Vivier wrote: > + ret = get_physical_address(&cpu->env, &physical, &prot, > + address, access_type, &page_size); > + if (ret == 0) { > + tlb_set_page(cs, address & -page_size, > + physical & -page_size, > + prot, mmu_idx, page_size); > + return 0; > + }
Having raised TARGET_PAGE_BITS to 12 hasn't eliminated the tlb_add_large_page path, merely reduced it to when the OS uses 8K pages. What you'd do to eliminate it is if (ret == 0) { address &= TARGET_PAGE_MASK; physical += address & (page_size - 1); tlb_set_page(cs, address, physical, prot, mmu_idx, TARGET_PAGE_SIZE); return 0; } Note that physical is always already aligned, because we pulled it out of the page tables that way. r~