diff options
| author | Sebastian Ott <sebott@redhat.com> | 2026-05-04 14:28:08 +0300 |
|---|---|---|
| committer | Marc Zyngier <maz@kernel.org> | 2026-05-06 19:09:03 +0300 |
| commit | fc240715fc5003538ff530e3cfb985e7769b7171 (patch) | |
| tree | 6852d837e58f6196015e9a4a76c4029dd316cb4d | |
| parent | 9be19df816dea9eb7dfe1661b3690bed6a2cb146 (diff) | |
| download | linux-fc240715fc5003538ff530e3cfb985e7769b7171.tar.xz | |
KVM: selftests: arm64: Fix steal_time test after UAPI refactoring
Fix the following failure to the steal_time test on arm64 by making
the timer address known to the guest.
==== Test Assertion Failure ====
steal_time.c:229: !ret
pid=18514 tid=18514 errno=22 - Invalid argument
1 0x000000000040252f: check_steal_time_uapi at steal_time.c:229 (discriminator 20)
2 (inlined by) main at steal_time.c:537 (discriminator 20)
3 0x0000ffffa23d621b: ?? ??:0
4 0x0000ffffa23d62fb: ?? ??:0
5 0x0000000000402b6f: _start at ??:?
KVM_SET_DEVICE_ATTR failed, rc: -1 errno: 22 (Invalid argument)
Fixes: 40351ed924dd ("KVM: selftests: Refactor UAPI tests into dedicated function")
Signed-off-by: Sebastian Ott <sebott@redhat.com>
Link: https://patch.msgid.link/20260504112808.21276-1-sebott@redhat.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
| -rw-r--r-- | tools/testing/selftests/kvm/steal_time.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/steal_time.c b/tools/testing/selftests/kvm/steal_time.c index 7df2bc8eec02..76fcdd1fd3cb 100644 --- a/tools/testing/selftests/kvm/steal_time.c +++ b/tools/testing/selftests/kvm/steal_time.c @@ -220,6 +220,8 @@ static void check_steal_time_uapi(void) }; vcpu_ioctl(vcpu, KVM_HAS_DEVICE_ATTR, &dev); + vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, ST_GPA_BASE, 1, 1, 0); + virt_map(vm, ST_GPA_BASE, ST_GPA_BASE, 1); st_ipa = (ulong)ST_GPA_BASE | 1; ret = __vcpu_ioctl(vcpu, KVM_SET_DEVICE_ATTR, &dev); |
