qemu-devel
[Top][All Lists]
Advanced

[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: Wed, 18 Apr 2012 20:18:59 +0000

On Wed, Apr 18, 2012 at 02:49, 陳韋任 <address@hidden> wrote:
> On Tue, Apr 17, 2012 at 08:17:09PM +0000, Blue Swirl wrote:
>> 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
>
>  So functions like __ldb_mmu actually don't need to walk the TLB again?

Only when they are called from generated code, then the generated code
has already checked that the address is not in the TLB.

> Why you said the patch was't very successful? I don't others' comment
> against the patch.

Patch 4/4 created another function for TCG callers which skipped the
lookup, called tlb_fill and then called the original helper. But GCC
didn't want to inline the full helper into this TCG helper, instead
added a call. For the call, the registers need to be shuffled. Also
stack protector added protections to both TCG helper and the full
helper. The machine code did not look efficient at all.

Maybe the code could be inlined manually with macros.

>
> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]