Skip to content

Commit 3a04225

Browse files
committed
KVM: selftests: Use vcpu_arch_put_guest() in mmu_stress_test
Use vcpu_arch_put_guest() to write memory from the guest in mmu_stress_test as an easy way to provide a bit of extra coverage. Reviewed-by: James Houghton <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 8abe763 commit 3a04225

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/kvm/mmu_stress_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static void guest_code(uint64_t start_gpa, uint64_t end_gpa, uint64_t stride)
2323

2424
for (;;) {
2525
for (gpa = start_gpa; gpa < end_gpa; gpa += stride)
26-
*((volatile uint64_t *)gpa) = gpa;
26+
vcpu_arch_put_guest(*((volatile uint64_t *)gpa), gpa);
2727
GUEST_SYNC(0);
2828
}
2929
}

0 commit comments

Comments
 (0)