Thread (33 messages) 33 messages, 4 authors, 6d ago

Re: [PATCH v4 13/14] KVM: selftests: Add option for different backing in pre-fault tests

From: Fuad Tabba <fuad.tabba@linux.dev>
Date: 2026-09-24 06:09:31
Also in: kvm, kvmarm, linux-doc, linux-kselftest, linux-s390, lkml

Hi Lorenzo,

On Wed, 23 Sep 2026 16:15:56 +0100, "Lorenzo Stoakes (ARM)"
[off-list ref] wrote:
[...]
quoted hunk ↗ jump to hunk
diff --git a/tools/testing/selftests/kvm/pre_fault_memory_test.c b/tools/testing/selftests/kvm/pre_fault_memory_test.c
[...]
quoted hunk ↗ jump to hunk
@@ -189,24 +195,28 @@ static void __test_pre_fault_memory(enum vm_guest_mode guest_mode, void *arg)
[...]
quoted hunk ↗ jump to hunk
         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 <fuad.tabba@linux.dev>

Cheers,
/fuad
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help