Re: [RFC PATCH v2 8/9] KVM: selftests: arm64: Extend kvm_page_table_test to run guest code in vEL2

From: Marc Zyngier
Date: Mon Jun 02 2025 - 11:52:14 EST


On Mon, 02 Jun 2025 07:04:07 +0100,
Itaru Kitayama <itaru.kitayama@xxxxxxxxx> wrote:
>
> On Mon, May 12, 2025 at 03:52:50AM -0700, Ganapatrao Kulkarni wrote:
> > Adding code to run guest_code in vEL2.
> > NV is enabled using command line argument and it is disabled by default.
> >
> > NV is only enabled on ARM64, for other architectures the test will exit
> > with an ASSERT, if tried to run with NV enabled.
> >
>
> I'm seeing this in QEMU TCG mode, does this mean the limitation of the
> emulation?
>
> $ sudo /mnt/projects/linux/tools/testing/selftests/kvm/arm64/page_fault_test -m 3 -s anonymous
> Random seed: 0x6b8b4567
> ==== Test Assertion Failure ====
> arm64/page_fault_test.c:632: test->expected_events.uffd_faults == events.uffd_faults
> pid=769 tid=769 errno=9 - Bad file descriptor
> 1 0x000000000040325b: check_event_counts at page_fault_test.c:632
> 2 (inlined by) run_test at page_fault_test.c:739
> 3 0x0000000000403cbf: for_each_guest_mode at guest_modes.c:96
> 4 0x0000000000401cfb: for_each_test_and_guest_mode at page_fault_test.c:1107
> 5 (inlined by) main at page_fault_test.c:1133
> 6 0x0000ffff848122db: ?? ??:0
> 7 0x0000ffff848123bb: ?? ??:0
> 8 0x0000000000401def: _start at ??:?
> 0x2 != 0x1 (test->expected_events.uffd_faults != events.uffd_faults)

Unlikely. This could be a bug in the test, in KVM, or most likely
both. You will have to investigate, I'm afraid.

M.

--
Jazz isn't dead. It just smells funny.