[kvm-unit-tests PATCH v6 00/14] arm64: EL2 support
Andrew Jones
andrew.jones at linux.dev
Fri Jan 23 11:23:41 PST 2026
On Fri, Jan 23, 2026 at 04:50:39PM +0000, Joey Gouly wrote:
> Hi all,
>
> This series is for adding support to running the kvm-unit-tests at EL2.
>
> Changes since v5[1]:
> - make debug bp/wp skip on EL2
> - fix microbench test
> - add to CI
> - applied the fixup's Drew talked about in v5
>
> About this failure in micro-bench:
>
> - micro-bench hits the assert in gicv3_lpi_alloc_tables()
> lib/arm/gic-v3.c:183: assert failed: gicv3_data.redist_base[cpu]: Redistributor for cpu0 not initialized. Did cpu0 enable the GIC?
>
> in micro-bench.c lpi_prep() looks like this:
>
> static bool lpi_prep(void)
> {
> struct its_collection *col1;
> struct its_device *dev2;
> if (!gicv3_its_base())
> return false;
>
> QEMU by default runs with gic-v2, so gicv3_its_base() should have returned
> false and the lpi tests skipped. However because of the overflow mentioned in
> the first commit (new to v6), the its_data.base was being overwritten to a
> non-zero value. This meant the test tried to do gic-v3 things on a gic-v2.
Nice work on the micro-bench/gic issue. Unfortunately the timer test still
times out, and that breaks the new CI since that test is listed.
# No EL2
$ ./run_tests.sh -g timer
PASS timer (18 tests)
# EL2
$ EL2=y ./run_tests.sh -g timer
FAIL timer (timeout; duration=10s)
$ TIMEOUT=90s EL2=y ./run_tests.sh -g timer
FAIL timer (timeout; duration=90s)
$ cat logs/timer.log
timeout -k 1s --foreground 90s /usr/bin/qemu-system-aarch64 -nodefaults -machine virt,virtualization=on -accel tcg -cpu max -device virtio-serial-device -device virtconsole,chardev=ctd -chardev testdev,id=ctd -device pci-testdev -display none -serial stdio -kernel arm/timer.flat -smp 1 # -initrd /tmp/tmp.N15fhaPbhB
CNTFRQ_EL0 : 0x0000000003b9aca0
CNTPCT_EL0 : 0x00000000001d3a1f
CNTP_CTL_EL0 : 0x0000000000000000
CNTP_CVAL_EL0: 0x0000000000000000
CNTVCT_EL0 : 0x00000000001d5884
CNTV_CTL_EL0 : 0x0000000000000000
CNTV_CVAL_EL0: 0x0000000000000000
INFO: vtimer-busy-loop: After timer: 0x000000000027ae86
INFO: vtimer-busy-loop: Expected : 0x000000000027415b
INFO: vtimer-busy-loop: Difference : 450 us
PASS: vtimer-busy-loop: latency within 10 ms
FAIL: vtimer-busy-loop: interrupt received
PASS: vtimer-busy-loop: not pending before
FAIL: vtimer-busy-loop: interrupt signal pending
PASS: vtimer-busy-loop: no interrupt when timer is disabled
PASS: vtimer-busy-loop: interrupt signal no longer pending
PASS: vtimer-busy-loop: interrupt signal not pending
INFO: vtimer-busy-loop: waiting for interrupt...
qemu-system-aarch64: terminating on signal 15 from pid 112137 (timeout)
Thanks,
drew
More information about the linux-arm-kernel
mailing list