diff mbox series

[15/15] KVM: selftests: Get rid of gorilla math in memslots modification test

Message ID 20210210230625.550939-16-seanjc@google.com (mailing list archive)
State New, archived
Headers show
Series VM: selftests: Hugepage fixes and cleanups | expand

Commit Message

Sean Christopherson Feb. 10, 2021, 11:06 p.m. UTC
Use the recently added perf_test_args.nr_bytes to define the location of
the dummy memslot created/removed by the memslot modification test.
Presumably, the goal of the existing code is simply to ensure the GPA of
the dummy memslot doesn't overlap with perf_test's memslot.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 .../testing/selftests/kvm/memslot_modification_stress_test.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/kvm/memslot_modification_stress_test.c b/tools/testing/selftests/kvm/memslot_modification_stress_test.c
index 5ea9d7ef248e..cfc2b75619ba 100644
--- a/tools/testing/selftests/kvm/memslot_modification_stress_test.c
+++ b/tools/testing/selftests/kvm/memslot_modification_stress_test.c
@@ -114,10 +114,7 @@  static void run_test(enum vm_guest_mode mode, void *arg)
 
 	add_remove_memslot(vm, p->memslot_modification_delay,
 			   p->nr_memslot_modifications,
-			   perf_test_args.gpa +
-			   (guest_percpu_mem_size * nr_vcpus) +
-			   getpagesize() +
-			   perf_test_args.guest_page_size);
+			   perf_test_args.gpa + perf_test_args.nr_bytes);
 
 	run_vcpus = false;