that is possible. but if that is the case, why not split the tlb walking and the tlb fill ? can anyone please confirm ?
Xin 2012/4/16 陳韋任 <che...@iis.sinica.edu.tw>: >> > If TLB miss, it will call something like __ldb_mmu (b). __ldb_mmu will try >> > to >> > walk guest page table, then fill TLB entry if page table hit, or raise a >> > guest >> > page fault exception if page table miss. >> >> Yep. that is what i was taught. the sequence of code above is an >> inlined assembly for walking the TLB. In the __ldx_mmu, the tlb is >> walked again ? why ? >> >> int index, shift; >> target_phys_addr_t ioaddr; >> unsigned long addend; >> target_ulong tlb_addr, addr1, addr2; >> >> index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); >> redo: >> tlb_addr = env->tlb_table[mmu_idx][index].ADDR_READ; >> if ((addr & TARGET_PAGE_MASK) == (tlb_addr & (TARGET_PAGE_MASK | >> TLB_INVALID_MASK))) { >> ... >> } >> >> ... >> ... >> fill_tlb() >> ... >> >> } > > Perhaps __ldb_mmu is not only called in the TLB lookup sequence, I guess. > But I am not sure of it. > > Regards, > chenwj > > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > Homepage: http://people.cs.nctu.edu.tw/~chenwj