qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [v2 PATCH] target-mips: implement UserLocal Register


From: Richard Henderson
Subject: Re: [Qemu-devel] [v2 PATCH] target-mips: implement UserLocal Register
Date: Tue, 27 May 2014 10:50:58 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/27/2014 10:28 AM, Petar Jovanovic wrote:
>> The normal way to handle this is to end the translation block whenever we 
>> issue
>> an instruction that could (unpredictably) affect how the TB is translated.
> 
>> In the mips translator, this is done via "ctx->bstate = BS_STOP".
>> There are plenty of examples within gen_mtc0 already.
> 
> Yes, I am aware of that, but this is not the case for HWrena in the code
> right now. Is it really cost-effective to force end of translation block in
> this case?

If you're going to add any hflags bits, I think adding a break write to HWrena
is required.

As for "cost-effective"... how often does HWrena change?  Surely only once
during the boot of the operating system.

Whereas the frequency of rdhwr is going to depend on the applications you're
running, and how much use of thread-local storage there is.

(James did some greps to find rdhwr insns in his userland, although I suspect
most of his userland is single-threaded, and so only libc.so is interesting in
that respect.)

Given that we're no where near running out of hflags bits, I don't think we
need to be so parsimonious that we avoid using one for UserLocal access.


r~



reply via email to

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