qemu/tests/tcg/aarch64
Zhuojia Shen bc6bd20ee3 target/arm: align exposed ID registers with Linux
In CPUID registers exposed to userspace, some registers were missing
and some fields were not exposed.  This patch aligns exposed ID
registers and their fields with what the upstream kernel currently
exposes.

Specifically, the following new ID registers/fields are exposed to
userspace:

ID_AA64PFR1_EL1.BT:       bits 3-0
ID_AA64PFR1_EL1.MTE:      bits 11-8
ID_AA64PFR1_EL1.SME:      bits 27-24

ID_AA64ZFR0_EL1.SVEver:   bits 3-0
ID_AA64ZFR0_EL1.AES:      bits 7-4
ID_AA64ZFR0_EL1.BitPerm:  bits 19-16
ID_AA64ZFR0_EL1.BF16:     bits 23-20
ID_AA64ZFR0_EL1.SHA3:     bits 35-32
ID_AA64ZFR0_EL1.SM4:      bits 43-40
ID_AA64ZFR0_EL1.I8MM:     bits 47-44
ID_AA64ZFR0_EL1.F32MM:    bits 55-52
ID_AA64ZFR0_EL1.F64MM:    bits 59-56

ID_AA64SMFR0_EL1.F32F32:  bit 32
ID_AA64SMFR0_EL1.B16F32:  bit 34
ID_AA64SMFR0_EL1.F16F32:  bit 35
ID_AA64SMFR0_EL1.I8I32:   bits 39-36
ID_AA64SMFR0_EL1.F64F64:  bit 48
ID_AA64SMFR0_EL1.I16I64:  bits 55-52
ID_AA64SMFR0_EL1.FA64:    bit 63

ID_AA64MMFR0_EL1.ECV:     bits 63-60

ID_AA64MMFR1_EL1.AFP:     bits 47-44

ID_AA64MMFR2_EL1.AT:      bits 35-32

ID_AA64ISAR0_EL1.RNDR:    bits 63-60

ID_AA64ISAR1_EL1.FRINTTS: bits 35-32
ID_AA64ISAR1_EL1.BF16:    bits 47-44
ID_AA64ISAR1_EL1.DGH:     bits 51-48
ID_AA64ISAR1_EL1.I8MM:    bits 55-52

ID_AA64ISAR2_EL1.WFxT:    bits 3-0
ID_AA64ISAR2_EL1.RPRES:   bits 7-4
ID_AA64ISAR2_EL1.GPA3:    bits 11-8
ID_AA64ISAR2_EL1.APA3:    bits 15-12

The code is also refactored to use symbolic names for ID register fields
for better readability and maintainability.

The test case in tests/tcg/aarch64/sysregs.c is also updated to match
the intended behavior.

Signed-off-by: Zhuojia Shen <chaosdefinition@hotmail.com>
Message-id: DS7PR12MB6309FB585E10772928F14271ACE79@DS7PR12MB6309.namprd12.prod.outlook.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: use Sn_n_Cn_Cn_n syntax to work with older assemblers
that don't recognize id_aa64isar2_el1 and id_aa64mmfr2_el1]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-01-05 14:12:34 +00:00
..
gdbstub target/arm: use official org.gnu.gdb.aarch64.sve layout for registers 2021-01-18 10:05:06 +00:00
system Drop more useless casts from void * to pointer 2022-12-14 16:19:35 +01:00
bti-1.c tests/tcg/aarch64: Add bti smoke tests 2020-10-27 10:44:03 +00:00
bti-2.c tests/tcg/aarch64: Add bti smoke tests 2020-10-27 10:44:03 +00:00
bti-3.c target/arm: Enable SCTLR_EL1.BT0 for aarch64-linux-user 2022-05-05 09:35:50 +01:00
bti-crt.inc.c tests/tcg/aarch64: Add bti smoke tests 2020-10-27 10:44:03 +00:00
fcvt.ref
float_convd.ref tests/tcg: add float_convd test 2022-04-20 16:04:20 +01:00
float_convs.ref tests/tcg: add generic version of float_convs 2019-09-26 19:00:53 +01:00
float_madds.ref tests/tcg: add float_madds test to multiarch 2019-09-26 19:00:53 +01:00
Makefile.softmmu-target tests/tcg: move compiler tests to Makefiles 2022-10-06 11:53:40 +01:00
Makefile.target target/arm: align exposed ID registers with Linux 2023-01-05 14:12:34 +00:00
mte-1.c tests/tcg/aarch64: Add mte smoke tests 2021-02-16 13:17:28 +00:00
mte-2.c tests/tcg/aarch64: Add mte smoke tests 2021-02-16 13:17:28 +00:00
mte-3.c tests/tcg/aarch64: Add mte smoke tests 2021-02-16 13:17:28 +00:00
mte-4.c tests/tcg/aarch64: Add mte smoke tests 2021-02-16 13:17:28 +00:00
mte-5.c test/tcg/aarch64: Add mte-5 2021-04-30 11:16:49 +01:00
mte-6.c accel/tcg: Preserve PAGE_ANON when changing page permissions 2021-04-12 11:06:24 +01:00
mte-7.c target/arm: Fix mte page crossing test 2021-06-16 14:33:51 +01:00
mte.h accel/tcg: Preserve PAGE_ANON when changing page permissions 2021-04-12 11:06:24 +01:00
pauth-1.c tests/tcg/aarch64: Add newline in pauth-1 printf 2020-03-05 16:09:19 +00:00
pauth-2.c target/arm: Use the proper TBI settings for linux-user 2021-02-16 13:07:56 +00:00
pauth-4.c tests/tcg: take into account expected clashes pauth-4 2020-02-25 20:20:23 +00:00
pauth-5.c target/arm: Fix AddPAC error indication 2020-08-03 17:55:03 +01:00
pcalign-a64.c tests/tcg: Add arm and aarch64 pc alignment tests 2021-12-15 10:35:26 +00:00
semicall.h semihosting: move semihosting tests to multiarch 2021-03-24 14:25:03 +00:00
sve-ioctls.c tests/tcg/aarch64: add SVE iotcl test 2020-03-17 17:38:47 +00:00
sysregs.c target/arm: align exposed ID registers with Linux 2023-01-05 14:12:34 +00:00
test-826.c target/arm: Fix sve2 ldnt1 and stnt1 2022-03-18 10:55:15 +00:00