aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/kvm/dirty_log_test.c
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2020-03-13 16:56:43 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-16 17:59:06 +0100
commitbeca54702dc694970dd9727dde59cf5f56c4dbd8 (patch)
tree4e2ccd5133b509daceea0627ffabbcc935352723 /tools/testing/selftests/kvm/dirty_log_test.c
parentKVM: selftests: Use consistent message for test skipping (diff)
downloadwireguard-linux-beca54702dc694970dd9727dde59cf5f56c4dbd8.tar.xz
wireguard-linux-beca54702dc694970dd9727dde59cf5f56c4dbd8.zip
KVM: selftests: virt_map should take npages, not size
Also correct the comment and prototype for vm_create_default(), as it takes a number of pages, not a size. Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/dirty_log_test.c')
-rw-r--r--tools/testing/selftests/kvm/dirty_log_test.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/dirty_log_test.c b/tools/testing/selftests/kvm/dirty_log_test.c
index 051791e0f5fb..8f5b590805a4 100644
--- a/tools/testing/selftests/kvm/dirty_log_test.c
+++ b/tools/testing/selftests/kvm/dirty_log_test.c
@@ -334,8 +334,7 @@ static void run_test(enum vm_guest_mode mode, unsigned long iterations,
KVM_MEM_LOG_DIRTY_PAGES);
/* Do mapping for the dirty track memory slot */
- virt_map(vm, guest_test_virt_mem, guest_test_phys_mem,
- guest_num_pages * guest_page_size, 0);
+ virt_map(vm, guest_test_virt_mem, guest_test_phys_mem, guest_num_pages, 0);
/* Cache the HVA pointer of the region */
host_test_mem = addr_gpa2hva(vm, (vm_paddr_t)guest_test_phys_mem);