qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH 08/23] target/arm: Define the FEAT_FGT registers


From: Richard Henderson
Subject: Re: [PATCH 08/23] target/arm: Define the FEAT_FGT registers
Date: Fri, 27 Jan 2023 16:31:27 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 1/27/23 07:54, Peter Maydell wrote:
Define the system registers which are provided by the
FEAT_FGT fine-grained trap architectural feature:
  HFGRTR_EL2, HFGWTR_EL2, HDFGRTR_EL2, HDFGWTR_EL2, HFGITR_EL2

All these registers are a set of bit fields, where each bit is set
for a trap and clear to not trap on a particular system register
access.  The R and W register pairs are for system registers,
allowing trapping to be done separately for reads and writes; the I
register is for system instructions where trapping is on instruction
execution.

The data storage in the CPU state struct is arranged as a set of
arrays rather than separate fields so that when we're looking up the
bits for a system register access we can just index into the array
rather than having to use a switch to select a named struct member.
The later FEAT_FGT2 will add extra elements to these arrays.

The field definitions for the new registers are in cpregs.h because
in practice the code that needs them is code that also needs
the cpregs information; cpu.h is included in a lot more files.
We're also going to add some FGT-specific definitions to cpregs.h
in the next commit.

We do not implement HAFGRTR_EL2, because we don't implement
FEAT_AMUv1.

Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---
  target/arm/cpregs.h | 285 ++++++++++++++++++++++++++++++++++++++++++++
  target/arm/cpu.h    |  15 +++
  target/arm/helper.c |  40 +++++++
  3 files changed, 340 insertions(+)

I spot-checked the field definitions before my eyes crossed.

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


r~



reply via email to

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