KVM: selftests: allow different backing source types
authorAxel Rasmussen <axelrasmussen@google.com>
Wed, 19 May 2021 20:03:34 +0000 (13:03 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 27 May 2021 11:45:56 +0000 (07:45 -0400)
commit0368c2c1b422c94968b5286f289aed7fe6af93c2
treea68647d89f3884976ef0099dec2f3a5798ec18d1
parent32ffa4f71e10009498ae6b54da65ab316db967bd
KVM: selftests: allow different backing source types

Add an argument which lets us specify a different backing memory type
for the test. The default is just to use anonymous, matching existing
behavior.

This is in preparation for testing UFFD minor faults. For that, we'll
need to use a new backing memory type which is setup with MAP_SHARED.

Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Message-Id: <20210519200339.829146-6-axelrasmussen@google.com>
Reviewed-by: Ben Gardon <bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/demand_paging_test.c