In order to test the granule protection system meaningfully, we need
to verify that certain memory accesses cause the correct exceptions.
AFAIK, we do have system tests which boot kernels using GPC, but no
finer grained tests for specific GPC behaviour.
So I've added the following example test of GPC. It uses a new vector
table which can replace the one in boot.S with one which will record
and ignore certain types of exception (data aborts and GPC
exceptions).
The test itself (gpc-test.c) is not quite ready for submission yet,
but I would like feedback on the mechanism used for verifying
exceptions. (For example, if we do in fact have an existing way of
testing exceptions.)
Once a mechanism for testing is in place, adding some more features
(for example FEAT_RME_GPC3) should be relatively easy.
Signed-off-by: Jim MacArthur <jim.macarthur@linaro.org>
---
Jim MacArthur (3):
boot.S: Allocate minimal space for granule protection tables
altvec.S: Alternative vector table for aarch64 testing
gpc-test.c: Basic test for granule protection check.
tests/tcg/aarch64/Makefile.softmmu-target | 7 +-
tests/tcg/aarch64/system/altvec.S | 129 ++++++++++++++++++++++++++++++
tests/tcg/aarch64/system/boot.S | 10 +++
tests/tcg/aarch64/system/gpc-test.c | 125 +++++++++++++++++++++++++++++
4 files changed, 270 insertions(+), 1 deletion(-)
---
base-commit: ee7eb612be8f8886d48c1d0c1f1c65e495138f83
change-id: 20260508-jmac-gpctest-a7fa6aa90c78
Best regards,
--
Jim MacArthur <jim.macarthur@linaro.org>