forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 475
Commit 8675c6f


Gavin Shan
Marc Zyngier
KVM: selftests: memslot_perf_test: Support variable guest page size
The test case is obviously broken on aarch64 because non-4KB guest
page size is supported. The guest page size on aarch64 could be 4KB,
16KB or 64KB.
This supports variable guest page size, mostly for aarch64.
- The host determines the guest page size when virtual machine is
created. The value is also passed to guest through the synchronization
area.
- The number of guest pages are unknown until the virtual machine
is to be created. So all the related macros are dropped. Instead,
their values are dynamically calculated based on the guest page
size.
- The static checks on memory sizes and pages becomes dependent
on guest page size, which is unknown until the virtual machine
is about to be created. So all the static checks are converted
to dynamic checks, done in check_memory_sizes().
- As the address passed to madvise() should be aligned to host page,
the size of page chunk is automatically selected, other than one
page.
- MEM_TEST_MOVE_SIZE has fixed and non-working 64KB. It will be
consolidated in next patch. However, the comments about how
it's calculated has been correct.
- All other changes included in this patch are almost mechanical
replacing '4096' with 'guest_page_size'.
Signed-off-by: Gavin Shan <[email protected]>
Reviewed-by: Maciej S. Szmigiero <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 3439643 commit 8675c6fCopy full SHA for 8675c6f
File tree
Expand file treeCollapse file tree
1 file changed
+129
-81
lines changedFilter options
- tools/testing/selftests/kvm
Expand file treeCollapse file tree
1 file changed
+129
-81
lines changed
0 commit comments