[kvm-unit-tests v3 07/13] powerpc/sprs: Specify SPRs with data rather than code

Thomas Huth thuth at redhat.com
Tue Apr 4 17:02:33 AEST 2023

On 27/03/2023 14.45, Nicholas Piggin wrote:
> A significant rework that builds an array of 'struct spr', where each
> element describes an SPR. This makes various metadata about the SPR
> like name and access type easier to carry and use.
> Hypervisor privileged registers are described despite not being used
> at the moment for completeness, but also the code might one day be
> reused for a hypervisor-privileged test.
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> This ended up a little over-engineered perhaps, but there are lots of
> SPRs, lots of access types, lots of changes between processor and ISA
> versions, and lots of places they are implemented and used, so lots of
> room for mistakes. There is not a good system in place to easily
> see that userspace, supervisor, etc., switches perform all the right
> SPR context switching so this is a nice test case to have. The sprs test
> quickly caught a few QEMU TCG SPR bugs which really motivated me to
> improve the SPR coverage.
> ---
> Since v2:
> - Merged with "Indirect SPR accessor functions" patch.
>   powerpc/sprs.c | 643 ++++++++++++++++++++++++++++++++++---------------
>   1 file changed, 450 insertions(+), 193 deletions(-)

Acked-by: Thomas Huth <thuth at redhat.com>

More information about the Linuxppc-dev mailing list