linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests: kvm: fix overlapping addresses in memslot_perf_test
@ 2021-05-28 19:11 Paolo Bonzini
  2021-05-28 19:51 ` Maciej S. Szmigiero
  0 siblings, 1 reply; 12+ messages in thread
From: Paolo Bonzini @ 2021-05-28 19:11 UTC (permalink / raw)
  To: linux-kernel, kvm; +Cc: Maciej S . Szmigiero

The memory that is allocated in vm_create is already mapped close to
GPA 0, because test_execute passes the requested memory to
prepare_vm.  This causes overlapping memory regions and the
test crashes.  For simplicity just move MEM_GPA higher.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tools/testing/selftests/kvm/memslot_perf_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c b/tools/testing/selftests/kvm/memslot_perf_test.c
index 11239652d805..6d28e920b1e3 100644
--- a/tools/testing/selftests/kvm/memslot_perf_test.c
+++ b/tools/testing/selftests/kvm/memslot_perf_test.c
@@ -29,7 +29,7 @@
 
 #define MEM_SIZE		((512U << 20) + 4096)
 #define MEM_SIZE_PAGES		(MEM_SIZE / 4096)
-#define MEM_GPA		0x10000000UL
+#define MEM_GPA			(MEM_SIZE + 0x10000000UL)
 #define MEM_AUX_GPA		MEM_GPA
 #define MEM_SYNC_GPA		MEM_AUX_GPA
 #define MEM_TEST_GPA		(MEM_AUX_GPA + 4096)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-06-08  3:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 19:11 [PATCH] selftests: kvm: fix overlapping addresses in memslot_perf_test Paolo Bonzini
2021-05-28 19:51 ` Maciej S. Szmigiero
2021-05-29 10:20   ` Paolo Bonzini
2021-05-29 23:13     ` Maciej S. Szmigiero
2021-06-02 23:07       ` Maciej S. Szmigiero
2021-06-03  5:26         ` Duan, Zhenzhong
2021-06-03 12:37           ` Andrew Jones
2021-06-03 13:05             ` Maciej S. Szmigiero
2021-06-04  3:35               ` Duan, Zhenzhong
2021-06-04 16:49                 ` selftests: kvm: allocating extra mem in slot 0 (Was: Re: [PATCH] selftests: kvm: fix overlapping addresses in memslot_perf_test) Maciej S. Szmigiero
2021-06-08  3:20                   ` Duan, Zhenzhong
2021-06-03 13:05           ` [PATCH] selftests: kvm: fix overlapping addresses in memslot_perf_test Maciej S. Szmigiero

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).