[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 35/60] target/arm: Handle cpreg registration for missing E
From: |
Peter Maydell |
Subject: |
Re: [PATCH v3 35/60] target/arm: Handle cpreg registration for missing EL |
Date: |
Tue, 26 Apr 2022 16:31:56 +0100 |
On Fri, 22 Apr 2022 at 11:57, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Sun, 17 Apr 2022 at 19:21, Richard Henderson
> <richard.henderson@linaro.org> wrote:
> >
> > More gracefully handle cpregs when EL2 and/or EL3 are missing.
> > If the reg is entirely inaccessible, do not register it at all.
> > If the reg is for EL2, and EL3 is present but EL2 is not,
> > squash to ARM_CP_CONST.
>
> I don't think we should do this unconditionally. Just because
> the architecture usually defines that an _EL2 register is
> RES0 if EL2 is not present doesn't mean that it does so for
> every register or that it guarantees that it will continue
> to do so in future. (For instance I found ZCR_EL2 and TFSR_EL2
> don't have that statement in their documentation, which might or
> might not be an oversight.) You could add an ARM_CP_ flag for
> "RES0 if no EL2" or something I guess?
I've just found rule R_RJFFP in section D1.1.3 of DDI0487H.a,
which explicitly documents that if EL2 is not implemented and
EL3 is, then "every accessible register associated with EL2 is
RES0" except for an enumerated list of six registers which are
not. So I'm more open to "default to RES0, with a flag to
suppress that default" than I was when I first reviewed this
patchset.
thanks
-- PMM
- [PATCH v3 38/60] target/arm: Add isar predicates for FEAT_Debugv8p2, (continued)
- [PATCH v3 38/60] target/arm: Add isar predicates for FEAT_Debugv8p2, Richard Henderson, 2022/04/17
- [PATCH v3 39/60] target/arm: Adjust definition of CONTEXTIDR_EL2, Richard Henderson, 2022/04/17
- [PATCH v3 33/60] target/arm: Store cpregs key in the hash table directly, Richard Henderson, 2022/04/17
- [PATCH v3 36/60] target/arm: Drop EL3 no EL2 fallbacks, Richard Henderson, 2022/04/17
- [PATCH v3 34/60] target/arm: Cleanup add_cpreg_to_hashtable, Richard Henderson, 2022/04/17
- [PATCH v3 35/60] target/arm: Handle cpreg registration for missing EL, Richard Henderson, 2022/04/17
- [PATCH v3 40/60] target/arm: Move cortex impdef sysregs to cpu_tcg.c, Richard Henderson, 2022/04/17
- [PATCH v3 45/60] target/arm: Use field names for manipulating EL2 and EL3 modes, Richard Henderson, 2022/04/17
- [PATCH v3 42/60] target/arm: Set ID_DFR0.PerfMon for qemu-system-arm -cpu max, Richard Henderson, 2022/04/17
- [PATCH v3 41/60] target/arm: Update qemu-system-arm -cpu max to cortex-a57, Richard Henderson, 2022/04/17
- [PATCH v3 43/60] target/arm: Split out aa32_max_features, Richard Henderson, 2022/04/17
- [PATCH v3 46/60] target/arm: Enable FEAT_Debugv8p2 for -cpu max, Richard Henderson, 2022/04/17
- [PATCH v3 47/60] target/arm: Enable FEAT_Debugv8p4 for -cpu max, Richard Henderson, 2022/04/17