[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210210230625.550939-16-seanjc@google.com>
Date: Wed, 10 Feb 2021 15:06:25 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Sean Christopherson <seanjc@...gle.com>,
Ben Gardon <bgardon@...gle.com>,
Yanan Wang <wangyanan55@...wei.com>,
Andrew Jones <drjones@...hat.com>,
Peter Xu <peterx@...hat.com>,
Aaron Lewis <aaronlewis@...gle.com>
Subject: [PATCH 15/15] KVM: selftests: Get rid of gorilla math in memslots
modification test
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@...gle.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
Powered by blists - more mailing lists