selftests: kvm: make allocation of extra memory take effect
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Wed, 12 May 2021 04:31:06 +0000 (12:31 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 27 May 2021 11:45:53 +0000 (07:45 -0400)
commit39fe2fc96694164723846fccf6caa42c3aee6ec4
tree56d77e22b8dc055e513bdf0fe0f84c30ddce6167
parentda6d63a0062a3ee721b84123b83ec093f25759b0
selftests: kvm: make allocation of extra memory take effect

The extra memory pages is missed to be allocated during VM creating.
perf_test_util and kvm_page_table_test use it to alloc extra memory
currently.

Fix it by adding extra_mem_pages to the total memory calculation before
allocate.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Message-Id: <20210512043107.30076-1-zhenzhong.duan@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/kvm_util.c