Skip to content

Commit 13c2c3c

Browse files
Maxim Levitskybonzini
authored andcommitted
KVM: selftests: fix hyperv_clock test
The test was mistakenly using addr_gpa2hva on a gva and that happened to work accidentally. Commit 106a2e7 ("KVM: selftests: Lower the min virtual address for misc page allocations") revealed this bug. Fixes: 2c7f76b ("selftests: kvm: Add basic Hyper-V clocksources tests", 2021-03-18) Signed-off-by: Maxim Levitsky <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent bb2baeb commit 13c2c3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/kvm/x86_64/hyperv_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ int main(void)
215215
vcpu_set_hv_cpuid(vm, VCPU_ID);
216216

217217
tsc_page_gva = vm_vaddr_alloc_page(vm);
218-
memset(addr_gpa2hva(vm, tsc_page_gva), 0x0, getpagesize());
218+
memset(addr_gva2hva(vm, tsc_page_gva), 0x0, getpagesize());
219219
TEST_ASSERT((addr_gva2gpa(vm, tsc_page_gva) & (getpagesize() - 1)) == 0,
220220
"TSC page has to be page aligned\n");
221221
vcpu_args_set(vm, VCPU_ID, 2, tsc_page_gva, addr_gva2gpa(vm, tsc_page_gva));

0 commit comments

Comments
 (0)