diff options
author | Ricardo Koller <ricarkol@google.com> | 2022-10-17 21:58:26 +0200 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-11-10 20:10:27 +0100 |
commit | bd3ed7e1a47eb7b3838ca09439f1eb289ec3be1f (patch) | |
tree | 99804e657a4db8bc720b5e4f0e5e1b2951368419 /tools/testing/selftests/kvm/lib/kvm_util.c | |
parent | tools: Copy bitfield.h from the kernel sources (diff) | |
download | linux-bd3ed7e1a47eb7b3838ca09439f1eb289ec3be1f.tar.xz linux-bd3ed7e1a47eb7b3838ca09439f1eb289ec3be1f.zip |
KVM: selftests: Stash backing_src_type in struct userspace_mem_region
Add the backing_src_type into struct userspace_mem_region. This struct
already stores a lot of info about memory regions, except the backing
source type. This info will be used by a future commit in order to
determine the method for punching a hole.
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221017195834.2295901-7-ricarkol@google.com
Diffstat (limited to 'tools/testing/selftests/kvm/lib/kvm_util.c')
-rw-r--r-- | tools/testing/selftests/kvm/lib/kvm_util.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c index 19e37fb7de7c..6affce47e899 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c @@ -929,6 +929,7 @@ void vm_userspace_mem_region_add(struct kvm_vm *vm, vm_mem_backing_src_alias(src_type)->name); } + region->backing_src_type = src_type; region->unused_phy_pages = sparsebit_alloc(); sparsebit_set_num(region->unused_phy_pages, guest_paddr >> vm->page_shift, npages); |