qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH 1/7] target/arm: Define and use new regime_tcr_value() functi


From: Richard Henderson
Subject: Re: [PATCH 1/7] target/arm: Define and use new regime_tcr_value() function
Date: Fri, 15 Jul 2022 04:42:48 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

On 7/14/22 18:52, Peter Maydell wrote:
The regime_tcr() function returns a pointer to a struct TCR
corresponding to the TCR controlling a translation regime.  The
struct TCR has the raw value of the register, plus two fields mask
and base_mask which are used as a small optimization in the case of
32-bit short-descriptor lookups.  Almost all callers of regime_tcr()
only want the raw register value.  Define and use a new
regime_tcr_value() function which returns only the raw 64-bit
register value.

This is a preliminary to removing the 32-bit short descriptor
optimization -- it only saves a handful of bit operations, which is
tiny compared to the overhead of doing a page table walk at all, and
the TCR struct is awkward and makes fixing
https://gitlab.com/qemu-project/qemu/-/issues/1103  unnecessarily
difficult.

Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---
  target/arm/internals.h  | 6 ++++++
  target/arm/helper.c     | 6 +++---
  target/arm/ptw.c        | 8 ++++----
  target/arm/tlb_helper.c | 2 +-
  4 files changed, 14 insertions(+), 8 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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