Re: [Qemu-devel] [PATCH RFC 3/5] softmmu: add a tlb_vaddr_to_host_fill function

2015-06-03 Thread Aurelien Jarno
On 2015-06-02 13:58, Richard Henderson wrote: > On 06/02/2015 01:10 PM, Aurelien Jarno wrote: > > It looks like we have to go through the MMIO functions to get the > > TLB_NOTDIRTY bit cleaned correctly. This is something we don't want for > > probe_write, so we definitely want two different functi

Re: [Qemu-devel] [PATCH RFC 3/5] softmmu: add a tlb_vaddr_to_host_fill function

2015-06-03 Thread Aurelien Jarno
On 2015-06-02 13:54, Richard Henderson wrote: > On 06/02/2015 04:26 AM, Aurelien Jarno wrote: > > int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); > > -CPUTLBEntry *tlbentry = &env->tlb_table[mmu_idx][index]; > > +CPUTLBEntry *tlbentry; > > target_ulong tlb_addr; > >

Re: [Qemu-devel] [PATCH RFC 3/5] softmmu: add a tlb_vaddr_to_host_fill function

2015-06-02 Thread Peter Maydell
On 2 June 2015 at 21:58, Richard Henderson wrote: > On 06/02/2015 01:10 PM, Aurelien Jarno wrote: >> It looks like we have to go through the MMIO functions to get the >> TLB_NOTDIRTY bit cleaned correctly. This is something we don't want for >> probe_write, so we definitely want two different func

Re: [Qemu-devel] [PATCH RFC 3/5] softmmu: add a tlb_vaddr_to_host_fill function

2015-06-02 Thread Richard Henderson
On 06/02/2015 01:10 PM, Aurelien Jarno wrote: > It looks like we have to go through the MMIO functions to get the > TLB_NOTDIRTY bit cleaned correctly. This is something we don't want for > probe_write, so we definitely want two different functions. I think that's why target-arm does it's somewhat

Re: [Qemu-devel] [PATCH RFC 3/5] softmmu: add a tlb_vaddr_to_host_fill function

2015-06-02 Thread Richard Henderson
On 06/02/2015 04:26 AM, Aurelien Jarno wrote: > int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); > -CPUTLBEntry *tlbentry = &env->tlb_table[mmu_idx][index]; > +CPUTLBEntry *tlbentry; > target_ulong tlb_addr; > uintptr_t haddr; > > +again: > +tlbentry = &env-

Re: [Qemu-devel] [PATCH RFC 3/5] softmmu: add a tlb_vaddr_to_host_fill function

2015-06-02 Thread Aurelien Jarno
On 2015-06-02 13:26, Aurelien Jarno wrote: > The softmmu code already provides a tlb_vaddr_to_host function, which > returns the host address corresponding to a guest virtual address, > *if it is already in the QEMU MMU TLB*. > > This patch is an attempt to have a function which try to fill the TL

[Qemu-devel] [PATCH RFC 3/5] softmmu: add a tlb_vaddr_to_host_fill function

2015-06-02 Thread Aurelien Jarno
The softmmu code already provides a tlb_vaddr_to_host function, which returns the host address corresponding to a guest virtual address, *if it is already in the QEMU MMU TLB*. This patch is an attempt to have a function which try to fill the TLB entry if it is not already in the QEMU MMU TLB, pos