diff options
author | Zhenzhong Duan <zhenzhong.duan@intel.com> | 2021-06-09 07:38:16 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-06-08 13:29:10 -0400 |
commit | f53b16ad64408b5376836708f8cf42dbf1cf6098 (patch) | |
tree | ff09930eb43c0805605e51e63bfdf2d52c07366e /tools/edid/Makefile | |
parent | 1bc603af73dd8fb2934306e861009c54f973dcc2 (diff) | |
download | linux-f53b16ad64408b5376836708f8cf42dbf1cf6098.tar.bz2 |
selftests: kvm: Add support for customized slot0 memory size
Until commit 39fe2fc96694 ("selftests: kvm: make allocation of extra
memory take effect", 2021-05-27), parameter extra_mem_pages was used
only to calculate the page table size for all the memory chunks,
because real memory allocation happened with calls of
vm_userspace_mem_region_add() after vm_create_default().
Commit 39fe2fc96694 however changed the meaning of extra_mem_pages to
the size of memory slot 0. This makes the memory allocation more
flexible, but makes it harder to account for the number of
pages needed for the page tables. For example, memslot_perf_test
has a small amount of memory in slot 0 but a lot in other slots,
and adding that memory twice (both in slot 0 and with later
calls to vm_userspace_mem_region_add()) causes an error that
was fixed in commit 000ac4295339 ("selftests: kvm: fix overlapping
addresses in memslot_perf_test", 2021-05-29)
Since both uses are sensible, add a new parameter slot0_mem_pages
to vm_create_with_vcpus() and some comments to clarify the meaning of
slot0_mem_pages and extra_mem_pages. With this change,
memslot_perf_test can go back to passing the number of memory
pages as extra_mem_pages.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Message-Id: <20210608233816.423958-4-zhenzhong.duan@intel.com>
[Squashed in a single patch and rewrote the commit message. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/edid/Makefile')
0 files changed, 0 insertions, 0 deletions