qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 3/3] target/arm: Flush only the TLBs affected


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 3/3] target/arm: Flush only the TLBs affected by TTBR*_EL1
Date: Fri, 19 Oct 2018 17:37:09 +0100

On 19 October 2018 at 17:31, Richard Henderson
<address@hidden> wrote:
> On 10/19/18 9:12 AM, Peter Maydell wrote:
>> A conservative check is probably:
>>   if arm_current_el() < 3
>>      // TTBR definitely can only be affecting the EL0/1
>>      // translation regime for the current security state
>>      if arm_is_secure_below_el3()
>>         if EL3 is AArch32
>>             flush S1SE0, S1E3
>>         else
>>             flush S1SE0, S1SE1
>>      else
>>         flush S12NSE1, S12NSE0
>>   else
>>      // err on the side of flushing more than maybe we need to
>>      flush S1SE0, S12NSE1, S12NSE0
>>      if EL3 is AArch32
>>           flush S1E3
>>      else
>>           flush S1SE1
>>
>> (but you should check my logic ;-))
>
> Riiight.
>
> Clearly it would be simpler and safer to track unused tlbs within cputlb.c.

The advantage of the above logic is that it means that even
when we do have trustzone and are using the secure TLBs,
we only flush the side we need to, not the whole lot.
(But yeah, it's a bit hairy.)

> So drop this patch for now and I'll get back to it.  The other two in this
> series are at least incremental improvement in the meantime.

OK, I'll put those in target-arm.next.

thanks
-- PMM



reply via email to

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