kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests: KVM: Call ucall_init when setting up in rseq_test
@ 2021-09-23 22:00 Oliver Upton
  2021-09-24  0:09 ` Sean Christopherson
  2021-09-28 15:30 ` Paolo Bonzini
  0 siblings, 2 replies; 9+ messages in thread
From: Oliver Upton @ 2021-09-23 22:00 UTC (permalink / raw)
  To: kvm, kvmarm
  Cc: Marc Zyngier, James Morse, Alexandru Elisei, Suzuki K Poulose,
	Paolo Bonzini, Jim Mattson, Sean Christopherson, Andrew Jones,
	Oliver Upton

While x86 does not require any additional setup to use the ucall
infrastructure, arm64 needs to set up the MMIO address used to signal a
ucall to userspace. rseq_test does not initialize the MMIO address,
resulting in the test spinning indefinitely.

Fix the issue by calling ucall_init() during setup.

Fixes: 61e52f1630f5 ("KVM: selftests: Add a test for KVM_RUN+rseq to detect task migration bugs")
Signed-off-by: Oliver Upton <oupton@google.com>
---
 tools/testing/selftests/kvm/rseq_test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/kvm/rseq_test.c b/tools/testing/selftests/kvm/rseq_test.c
index 060538bd405a..c5e0dd664a7b 100644
--- a/tools/testing/selftests/kvm/rseq_test.c
+++ b/tools/testing/selftests/kvm/rseq_test.c
@@ -180,6 +180,7 @@ int main(int argc, char *argv[])
 	 * CPU affinity.
 	 */
 	vm = vm_create_default(VCPU_ID, 0, guest_code);
+	ucall_init(vm, NULL);
 
 	pthread_create(&migration_thread, NULL, migration_worker, 0);
 
-- 
2.33.0.685.g46640cef36-goog


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

end of thread, other threads:[~2021-09-28 15:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 22:00 [PATCH] selftests: KVM: Call ucall_init when setting up in rseq_test Oliver Upton
2021-09-24  0:09 ` Sean Christopherson
2021-09-24  0:10   ` Oliver Upton
2021-09-24  6:32     ` Paolo Bonzini
2021-09-24  6:47   ` Andrew Jones
2021-09-27 20:05     ` Sean Christopherson
2021-09-28  7:24       ` Andrew Jones
2021-09-28 15:20         ` Sean Christopherson
2021-09-28 15:30 ` Paolo Bonzini

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).