Hi Lorenzo,

On Wed, 23 Sep 2026 16:15:56 +0100, "Lorenzo Stoakes (ARM)"
<[email protected]> 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?

Reviewed-by: Fuad Tabba <[email protected]>

Cheers,
/fuad

Reply via email to