]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Drop DEFAULT_GUEST_PHY_PAGES, open code the magic number
authorSean Christopherson <seanjc@google.com>
Tue, 3 May 2022 22:26:02 +0000 (15:26 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:47:27 +0000 (11:47 -0400)
commitc942350d1cea5e8f75c2571edfefcbcb9a2f8544
tree61c8ca725c9b188bb4d8892ff4116de601e63bd7
parent5d86c1ccbd348876a6ec75714effd4e3da12d663
KVM: selftests: Drop DEFAULT_GUEST_PHY_PAGES, open code the magic number

Remove DEFAULT_GUEST_PHY_PAGES and open code the magic number (with a
comment) in vm_nr_pages_required().  Exposing DEFAULT_GUEST_PHY_PAGES to
tests was a symptom of the VM creation APIs not cleanly supporting tests
that create runnable vCPUs, but can't do so immediately.  Now that tests
don't have to manually compute the amount of memory needed for basic
operation, make it harder for tests to do things that should be handled
by the framework, i.e. force developers to improve the framework instead
of hacking around flaws in individual tests.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/include/kvm_util_base.h
tools/testing/selftests/kvm/lib/kvm_util.c