]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Add memslot modification stress test
authorBen Gardon <bgardon@google.com>
Tue, 12 Jan 2021 21:42:53 +0000 (13:42 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Feb 2021 10:27:19 +0000 (05:27 -0500)
commit20f97a617019569413d3b97fffcf5205c82e6b15
tree7968c185449fcbf29d26454af6fca4de6570eb5b
parentfe99d0005789205698ca3e8cca56b92ce4d063cf
KVM: selftests: Add memslot modification stress test

Add a memslot modification stress test in which a memslot is repeatedly
created and removed while vCPUs access memory in another memslot. Most
userspaces do not create or remove memslots on running VMs which makes
it hard to test races in adding and removing memslots without a
dedicated test. Adding and removing a memslot also has the effect of
tearing down the entire paging structure, which leads to more page
faults and pressure on the page fault handling path than a one-and-done
memory population test.

Reviewed-by: Jacob Xu <jacobhxu@google.com>
Signed-off-by: Ben Gardon <bgardon@google.com>
Message-Id: <20210112214253.463999-7-bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/memslot_modification_stress_test.c [new file with mode: 0644]