Skip to content

kvm-unit-tests: add first GIC MMIO tests

Andre Przywara kvm kvmarm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4arm/arm64: GIC: basic GICv2 MMIO testsarm/gic.c arm/unittests.cfg lib/arm/asm/gic.h+107 -03 replies
2/4arm/arm64: GICv2: add GICD_IPRIORITYR testingarm/gic.c+72 -02 replies
3/4arm/arm64: GICv2: add GICD_ITARGETSR testingarm/gic.c lib/arm/asm/gic.h+55 -05 replies
4/4arm/arm64: GICv3: add TYPER testarm/gic.c arm/unittests.cfg+37 -32 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchAndrew Jones
1/4
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [kvm-unit-tests PATCH 0/4] kvm-unit-tests: add first GIC MMIO tests

The GIC spec mandates certain constraints on how to acccess the MMIO mapped registers, both in terms of which registers are available and also in terms of which bits within a register should be masked, for instance. Since we went through some lengths in the KVM emulation to implement this, it's about time to give this actually a test beyond what the kernel as a GIC user actually implements - for instance we ignore priorities in Linux.

This series tries to attack some constraints, on a low-hanging-fruit base. It focusses on some generic registers and the PRIORITY and TARGETS registers of GICv2. GICv3 is only covered to the point where the GICv2 tests overlap with GICv3.

This actually revealed genuine bugs in the KVM emulation, for which I sent fixes in the last days. With those fixes the kernel passes all tests.

Please have a look whether this makes sense and should eventually be extended on that base.

Applies on top of master + Drew's v6 series.

Cheers,
Andre.

Andre Przywara (4):
arm/arm64: GIC: basic GICv2 MMIO tests
arm/arm64: GICv2: add GICD_IPRIORITYR testing
arm/arm64: GICv2: add GICD_ITARGETSR testing
arm/arm64: GICv3: add TYPER test

 arm/gic.c         | 253 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 arm/unittests.cfg |  12 +++
 lib/arm/asm/gic.h |   3 +
 3 files changed, 268 insertions(+)
Signature · 1 line
2.9.0