Skip to content

Commit fbf094c

Browse files
ouptonbonzini
authored andcommitted
selftests: KVM: Call ucall_init when setting up in rseq_test
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: 61e52f1 ("KVM: selftests: Add a test for KVM_RUN+rseq to detect task migration bugs") Signed-off-by: Oliver Upton <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 6bc6db0 commit fbf094c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/kvm/rseq_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ int main(int argc, char *argv[])
180180
* CPU affinity.
181181
*/
182182
vm = vm_create_default(VCPU_ID, 0, guest_code);
183+
ucall_init(vm, NULL);
183184

184185
pthread_create(&migration_thread, NULL, migration_worker, 0);
185186

0 commit comments

Comments
 (0)