KVM: selftests: Add test for KVM_SET_USER_MEMORY_REGION
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 18 Feb 2020 21:07:33 +0000 (13:07 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Mar 2020 16:57:27 +0000 (17:57 +0100)
commit13e48aa9429d1be05ecf8b9eefb212ac58f3f704
treeb0d9a0e1bb4c104bb5937476712deb38e8bd16cf
parent36947254e5f981aeeedab1c7dfa35fc34d330e80
KVM: selftests: Add test for KVM_SET_USER_MEMORY_REGION

Add a KVM selftest to test moving the base gfn of a userspace memory
region.  Although the basic concept of moving memory regions is not x86
specific, the assumptions regarding large pages and MMIO shenanigans
used to verify the correctness make this x86_64 only for the time being.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/x86_64/set_memory_region_test.c [new file with mode: 0644]