lkml.org 
[lkml]   [2021]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 15/15] KVM: selftests: Get rid of gorilla math in memslots modification test
From
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 --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;

--
2.30.0.478.g8a0d178c01-goog
\
 
 \ /
  Last update: 2021-02-11 00:14    [W:0.355 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site