Richard Henderson and Peter Maydell
97de03a0bf
target/arm: Add isar feature test for FEAT_AIE
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20251014195017.421681-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-10-23 13:12:49 +01:00
Gustavo Romero and Peter Maydell
700f08d582
target/arm: Implement FEAT_MEC registers
...
Add all FEAT_MEC registers. Enable access to the registers via the
SCTLR2 and TCR2 control bits. Add the two new cache management
instructions, which are nops in QEMU because we do not model caches.
Message-ID: <20250711140828.1714666-3-gustavo.romero@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org >
Message-id: 20251006001018.219756-3-gustavo.romero@linaro.org
[rth: Squash 3 patches to add all registers at once.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-10-10 13:22:05 +01:00
Richard Henderson and Peter Maydell
d8bf1761ef
target/arm: Add GCS cpregs
...
Add isar_feature_aa64_gcs.
Enable SCR_GCSEN in scr_write.
Enable HCRX_GCSEN in hcrx_write.
Default HCRX_GCSEN on if EL2 disabled.
Add the GCSCR* and GCSPR* registers.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20251008215613.300150-32-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-10-10 10:42:12 +01:00
Richard Henderson and Peter Maydell
c817b325c1
target/arm: Add isar feature test for FEAT_S1PIE, FEAT_S2PIE
...
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20251008215613.300150-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-10-10 10:42:12 +01:00
Richard Henderson and Peter Maydell
0407192ae6
target/arm: Add isar feature test for FEAT_RME_GPC2
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-id: 20250926001134.295547-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-10-07 11:26:10 +01:00
Peter Maydell
b71e2b281a
target/arm: Implement ID_AA64PFR2_EL1
...
Currently we define the ID_AA64PFR2_EL1 encoding as reserved (with
the required RAZ behaviour for unassigned system registers in the ID
register encoding space). Newer architecture versions start to
define fields in this ID register, so define the appropriate
constants and implement it as an ID register backed by a field in
cpu->isar. Since none of our CPUs set that isar field to non-zero,
there is no behavioural change here (other than the name exposed to
the user via the gdbstub), but this paves the way for implementing
the new features that use fields in this register.
The fields here are the ones documented in rev L.b of the Arm ARM.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2025-09-26 13:43:33 +01:00
Peter Maydell
ff197ae9a4
target/arm: Move ID register field defs to cpu-features.h
...
Currently we define constants for the ID register fields in cpu.h.
This means they're defined for a lot more code in QEMU than actually
needs them. Move them to cpu-features.h, which is where we define
the feature functions that test fields in these registers.
There's only one place where we need to use some of these macro
definitions that we weren't already including cpu-features.h:
linux-user/arm/target_proc.h. Otherwise this patch is a pure
movement of code from one file to the other.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2025-09-26 13:40:43 +01:00
Richard Henderson and Peter Maydell
2b5daf79c3
target/arm: Implement FEAT_ATS1A
...
Implement FEAT_ATS1A and enable for -cpu max.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20250830054128.448363-13-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-09-16 17:31:53 +01:00
Richard Henderson and Peter Maydell
99e441107e
target/arm: Implement FEAT_LSE128
...
This feature contains the LDCLRP, LDSETP, and SWPP instructions.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 20250815122653.701782-7-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-08-30 16:38:46 +01:00
Richard Henderson and Peter Maydell
905c2c34fe
target/arm: Rename isar_feature_aa64_atomics
...
This is FEAT_LSE -- rename the predicate to match.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 20250830045006.380393-1-richard.henderson@linaro.org
Message-id: 20250815122653.701782-6-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-08-30 16:38:18 +01:00
Peter Maydell
c2fae59709
target/arm: Correct condition of aa64_atomics feature function
...
The ARMv8.1-Atomics feature (renamed FEAT_LSE in more modern versions
of the Arm ARM) has always ben indicated by ID_AA64ISAR0.ATOMIC being
0b0010 or greater; 0b0001 is a reserved unused value.
We were incorrectly checking for != 0; this had no harmful effects
because all the CPUs set their value for this field to either 0
(for not having the feature) or 2 (if they do have it), but it's
better to match what the architecture specifies here.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20250819145659.2165160-1-peter.maydell@linaro.org
2025-08-30 16:37:23 +01:00
Richard Henderson and Peter Maydell
3b53af353b
target/arm: Add feature predicate for FEAT_CSSC
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 20250803014019.416797-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-08-30 16:37:22 +01:00
Gustavo Romero and Peter Maydell
6e6d5fb4b9
target/arm: Implement FEAT_TCR2 and enable with -cpu max
...
Add FEAT_TCR2, which introduces the TCR2_EL1 and TCR2_EL2 registers.
These registers are extensions of the TCR_ELx registers and provide
top-level control of the EL10 and EL20 translation regimes.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20250727074202.83141-5-richard.henderson@linaro.org
Message-ID: <20250711140828.1714666-5-gustavo.romero@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
[rth: Remove FEAT_MEC code; handle SCR and HCRX enable bits.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-08-30 16:37:22 +01:00
Gustavo Romero and Peter Maydell
8a60ffe9a8
target/arm: Implement FEAT_SCTLR2 and enable with -cpu max
...
Add FEAT_SCTLR2, which introduces the SCTLR2_EL1, SCTLR2_EL2, and
SCTLR2_EL3 registers. These registers are extensions of the SCTLR_ELx
ones.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20250727074202.83141-4-richard.henderson@linaro.org
Message-ID: <20250711140828.1714666-4-gustavo.romero@linaro.org >
[rth: Remove FEAT_MEC code; handle SCR and HCRX enable bits.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-08-30 16:37:22 +01:00
Richard Henderson and Peter Maydell
d8ff459b40
target/arm: Add isar feature tests for SME2p1, SVE2p1
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20250704142112.1018902-15-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-04 15:52:21 +01:00
Eric Auger and Peter Maydell
987fa88a11
arm/cpu: Store id_mmfr0-5 into the idregs array
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Sebastian Ott <sebott@redhat.com >
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Message-id: 20250617153931.1330449-12-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-01 15:08:29 +01:00
Eric Auger and Peter Maydell
33801d9bd0
arm/cpu: Store id_dfr0/1 into the idregs array
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Sebastian Ott <sebott@redhat.com >
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Message-id: 20250617153931.1330449-11-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-01 15:08:28 +01:00
Eric Auger and Peter Maydell
30ca689900
arm/cpu: Store id_pfr0/1/2 into the idregs array
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Sebastian Ott <sebott@redhat.com >
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Message-id: 20250617153931.1330449-10-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-01 15:08:28 +01:00
Eric Auger and Peter Maydell
c0c2344c43
arm/cpu: Store id_isar0-7 into the idregs array
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Sebastian Ott <sebott@redhat.com >
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Message-id: 20250617153931.1330449-9-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-01 15:08:28 +01:00
Eric Auger and Peter Maydell
2927977364
arm/cpu: Store aa64smfr0 into the idregs array
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Sebastian Ott <sebott@redhat.com >
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Message-id: 20250617153931.1330449-8-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-01 15:08:27 +01:00
Eric Auger and Peter Maydell
def3f1c102
arm/cpu: Store aa64dfr0/1 into the idregs array
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Sebastian Ott <sebott@redhat.com >
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Message-id: 20250617153931.1330449-7-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-01 15:08:27 +01:00
Eric Auger and Peter Maydell
f1fd81291c
arm/cpu: Store aa64mmfr0-3 into the idregs array
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Sebastian Ott <sebott@redhat.com >
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Message-id: 20250617153931.1330449-6-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-01 15:08:27 +01:00
Eric Auger and Peter Maydell
d1a3cc9634
arm/cpu: Store aa64pfr0/1 into the idregs array
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Sebastian Ott <sebott@redhat.com >
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Message-id: 20250617153931.1330449-5-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-01 15:08:26 +01:00
Eric Auger and Peter Maydell
03380dd993
arm/cpu: Store aa64isar1/2 into the idregs array
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Sebastian Ott <sebott@redhat.com >
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Message-id: 20250617153931.1330449-4-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-01 15:08:26 +01:00
Eric Auger and Peter Maydell
804cfc7eed
arm/cpu: Store aa64isar0/aa64zfr0 into the idregs arrays
...
Also add kvm accessors for storing host features into idregs.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Sebastian Ott <sebott@redhat.com >
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Cornelia Huck <cohuck@redhat.com >
Message-id: 20250617153931.1330449-3-cohuck@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-07-01 15:08:26 +01:00