Re: [PATCH 6/8] KVM: selftests: Enable pre_fault_memory_test for arm64

From: Fuad Tabba

Date: Thu Sep 10 2026 - 14:59:17 EST


On Tue, 25 Aug 2026 at 17:01, Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx> wrote:
>
> From: Jack Thomson <jackabt@xxxxxxxxxx>
>
> Enable the pre_fault_memory_test to run on arm64 by making it work with
> different guest page sizes and testing multiple guest configurations.
>
> Update the test_assert to compare against the UCALL_EXIT_REASON, for
> portability, as arm64 exits with KVM_EXIT_MMIO while x86 uses
> KVM_EXIT_IO.

The message says this updates the test_assert for portability, but the
parent has no exit-reason assert and no struct kvm_run; this patch
adds both, so there was no hardcoded KVM_EXIT_IO to make portable.

...

> int main(int argc, char *argv[])
> {
...
> +
> TEST_REQUIRE(kvm_check_cap(KVM_CAP_PRE_FAULT_MEMORY));
>
> test_pre_fault_memory(0, false);

Would it be worth adding an arm64 case for gmem_abort()'s pre-fault path?

Cheers,
/fuad

>
> --
> 2.55.0
>