]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Introduce num-pages conversion utilities
authorAndrew Jones <drjones@redhat.com>
Fri, 14 Feb 2020 14:59:20 +0000 (15:59 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 24 Feb 2020 19:05:23 +0000 (20:05 +0100)
commit0865565012abff7c54abbe8c973d35a781512109
tree48eea7b90298e9a8eeb56bb61ee4bc39026b72aa
parente16e069af42b21e3c2469a861ecaf2d8c94829d8
KVM: selftests: Introduce num-pages conversion utilities

Guests and hosts don't have to have the same page size. This means
calculations are necessary when selecting the number of guest pages
to allocate in order to ensure the number is compatible with the
host. Provide utilities to help with those calculations and apply
them where appropriate.

We also revert commit a170b37f675e ("kvm: selftests: aarch64:
dirty_log_test: fix unaligned memslot size") and then use
vm_adjust_num_guest_pages() there instead.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/dirty_log_test.c
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/lib/kvm_util.c