[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aTMXYZgZM3QvZP2i@google.com>
Date: Fri, 5 Dec 2025 17:33:21 +0000
From: Vincent Donnefort <vdonnefort@...gle.com>
To: Jack Thomson <jackabt.amazon@...il.com>
Cc: maz@...nel.org, oliver.upton@...ux.dev, pbonzini@...hat.com,
joey.gouly@....com, suzuki.poulose@....com, yuzenghui@...wei.com,
catalin.marinas@....com, will@...nel.org, shuah@...nel.org,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
isaku.yamahata@...el.com, xmarcalx@...zon.co.uk,
kalyazin@...zon.co.uk, jackabt@...zon.com
Subject: Re: [PATCH v3 2/3] KVM: selftests: Enable pre_fault_memory_test for
arm64
On Wed, Nov 19, 2025 at 03:49:09PM +0000, Jack Thomson wrote:
> From: Jack Thomson <jackabt@...zon.com>
>
> 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.
>
> Signed-off-by: Jack Thomson <jackabt@...zon.com>
> ---
> tools/testing/selftests/kvm/Makefile.kvm | 1 +
> .../selftests/kvm/pre_fault_memory_test.c | 78 ++++++++++++++-----
> 2 files changed, 58 insertions(+), 21 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
> index 148d427ff24b..0ddd8db60197 100644
> --- a/tools/testing/selftests/kvm/Makefile.kvm
> +++ b/tools/testing/selftests/kvm/Makefile.kvm
> @@ -183,6 +183,7 @@ TEST_GEN_PROGS_arm64 += memslot_perf_test
> TEST_GEN_PROGS_arm64 += mmu_stress_test
> TEST_GEN_PROGS_arm64 += rseq_test
> TEST_GEN_PROGS_arm64 += steal_time
> +TEST_GEN_PROGS_arm64 += pre_fault_memory_test
>
> TEST_GEN_PROGS_s390 = $(TEST_GEN_PROGS_COMMON)
> TEST_GEN_PROGS_s390 += s390/memop
> diff --git a/tools/testing/selftests/kvm/pre_fault_memory_test.c b/tools/testing/selftests/kvm/pre_fault_memory_test.c
> index f04768c1d2e4..674931e7bb3a 100644
> --- a/tools/testing/selftests/kvm/pre_fault_memory_test.c
> +++ b/tools/testing/selftests/kvm/pre_fault_memory_test.c
> @@ -11,19 +11,29 @@
> #include <kvm_util.h>
> #include <processor.h>
> #include <pthread.h>
> +#include <guest_modes.h>
>
> /* Arbitrarily chosen values */
> -#define TEST_SIZE (SZ_2M + PAGE_SIZE)
> -#define TEST_NPAGES (TEST_SIZE / PAGE_SIZE)
After applying on top of the base commit
8a4821412cf2c1429fffa07c012dd150f2edf78c, it does not build.
That TEST_NPAGES seems to still be used in delete_slot_worker(). I believe
that's because of
"KVM: selftests: Test prefault memory during concurrent memslot removal"
Related issues with the pre_fault_memory() prototype.
Is that the correct base-commit or shall I use something else?
> +#define TEST_BASE_SIZE SZ_2M
> #define TEST_SLOT 10
>
[...]
Powered by blists - more mailing lists