[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] qemu softmmu inlined lookup sequence
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] qemu softmmu inlined lookup sequence |
Date: |
Tue, 17 Apr 2012 20:17:09 +0000 |
On Tue, Apr 17, 2012 at 05:40, Xin Tong <address@hidden> wrote:
> that is possible. but if that is the case, why not split the tlb
> walking and the tlb fill ? can anyone please confirm ?
I sent a patch earlier that did something like that but it wasn't very
successful:
http://lists.nongnu.org/archive/html/qemu-devel/2012-04/msg00992.html
>
> Xin
>
>
> 2012/4/16 陳韋任 <address@hidden>:
>>> > 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
>
Re: [Qemu-devel] qemu softmmu inlined lookup sequence, Xin Tong, 2012/04/21