Re: [PATCH v4 13/14] KVM: selftests: Add option for different backing in pre-fault tests
From: Lorenzo Stoakes (ARM)
Date: Thu Sep 24 2026 - 04:30:21 EST
On Thu, Sep 24, 2026 at 07:08:52AM +0100, Fuad Tabba wrote:
> Hi Lorenzo,
>
> On Wed, 23 Sep 2026 16:15:56 +0100, "Lorenzo Stoakes (ARM)"
> <ljs@xxxxxxxxxx> wrote:
> [...]
> > diff --git a/tools/testing/selftests/kvm/pre_fault_memory_test.c b/tools/testing/selftests/kvm/pre_fault_memory_test.c
> [...]
> > @@ -189,24 +195,28 @@ static void __test_pre_fault_memory(enum vm_guest_mode guest_mode, void *arg)
> [...]
> > test_config.test_size = align_up(TEST_BASE_SIZE + test_config.page_size,
> > - host_page_size);
> > + mem_page_size);
> > test_config.test_num_pages = vm_calc_num_guest_pages(vm->mode, test_config.test_size);
>
> With -s anonymous_hugetlb_1gb, test_size becomes 1G and setup aborts
> on 4K guest modes, as memslot 0 has no room for the page tables that
> map it:
>
> No guest physical page available, min_gpa: 0x180000 page_size:
> 0x1000 memslot: 0
>
> As a followup, could you compute test_num_pages before creating the VM
> and pass it as extra_mem_pages, as arm64/sea_to_user.c does?
Ack, can look into that and send a follow up patch after!
>
> Reviewed-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
Thanks!
>
> Cheers,
> /fuad
--
Cheers, Lorenzo