Hi, I've re-spun the cpuid patches with the changes suggested by Peter's review. The biggest change is the squashing of bits is now all data driven with ARMCPRegUserSpaceInfo being used to control how bits are altered for userspace presentation. This includes using glob matching to set whole bunches to RAZ.
The testcase isn't as comprehensive as it could be because you need a fairly new compiler (binutils) to emit all the various system register id's to test. I did look into upgrading debian-arm64-cross with Buster but I managed to find a bug in Debian's dependencies which rules out upgrading for now. checkpatch is complaining about the _m macro I used to group together words in the masks I defined. I'm not sure adding the spaces makes it as readable though. The following patches need review: patch 0001/target arm relax permission checks for HWCAP_CPUI.patch patch 0002/target arm expose CPUID registers to userspace.patch patch 0003/target arm expose MPIDR_EL1 to userspace.patch patch 0004/target arm expose remaining CPUID registers as RA.patch patch 0006/tests tcg aarch64 userspace system register test.patch Alex Bennée (6): target/arm: relax permission checks for HWCAP_CPUID registers target/arm: expose CPUID registers to userspace target/arm: expose MPIDR_EL1 to userspace target/arm: expose remaining CPUID registers as RAZ linux-user/elfload: enable HWCAP_CPUID for AArch64 tests/tcg/aarch64: userspace system register test linux-user/elfload.c | 1 + target/arm/cpu.h | 36 +++++++ target/arm/helper.c | 106 ++++++++++++++++-- tests/tcg/aarch64/Makefile.target | 4 +- tests/tcg/aarch64/sysregs.c | 172 ++++++++++++++++++++++++++++++ 5 files changed, 310 insertions(+), 9 deletions(-) create mode 100644 tests/tcg/aarch64/sysregs.c -- 2.20.1