From: Vincent Donnefort <vdonnefort@google.com>
To: Jack Thomson <jackabt.amazon@gmail.com>
Cc: maz@kernel.org, oliver.upton@linux.dev, pbonzini@redhat.com,
joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com,
catalin.marinas@arm.com, will@kernel.org, shuah@kernel.org,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
isaku.yamahata@intel.com, xmarcalx@amazon.co.uk,
kalyazin@amazon.co.uk, jackabt@amazon.com
Subject: Re: [PATCH v3 2/3] KVM: selftests: Enable pre_fault_memory_test for arm64
Date: Fri, 5 Dec 2025 17:33:21 +0000 [thread overview]
Message-ID: <aTMXYZgZM3QvZP2i@google.com> (raw)
In-Reply-To: <20251119154910.97716-3-jackabt.amazon@gmail.com>
On Wed, Nov 19, 2025 at 03:49:09PM +0000, Jack Thomson wrote:
> From: Jack Thomson <jackabt@amazon.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@amazon.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
>
[...]
next prev parent reply other threads:[~2025-12-05 17:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 15:49 [PATCH v3 0/3] KVM ARM64 pre_fault_memory Jack Thomson
2025-11-19 15:49 ` [PATCH v3 1/3] KVM: arm64: Add pre_fault_memory implementation Jack Thomson
2025-11-24 10:38 ` Vladimir Murzin
2025-11-24 11:34 ` Marc Zyngier
2025-11-24 12:54 ` Marc Zyngier
2025-11-26 17:14 ` Thomson, Jack
2025-12-15 11:43 ` Thomson, Jack
2025-11-19 15:49 ` [PATCH v3 2/3] KVM: selftests: Enable pre_fault_memory_test for arm64 Jack Thomson
2025-12-05 17:33 ` Vincent Donnefort [this message]
2025-11-19 15:49 ` [PATCH v3 3/3] KVM: selftests: Add option for different backing in pre-fault tests Jack Thomson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aTMXYZgZM3QvZP2i@google.com \
--to=vdonnefort@google.com \
--cc=catalin.marinas@arm.com \
--cc=isaku.yamahata@intel.com \
--cc=jackabt.amazon@gmail.com \
--cc=jackabt@amazon.com \
--cc=joey.gouly@arm.com \
--cc=kalyazin@amazon.co.uk \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=shuah@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
--cc=xmarcalx@amazon.co.uk \
--cc=yuzenghui@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.