Skip to content

Commit c1797c2

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 <jthoughton@google.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-11-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent d2fa5a3 commit c1797c2

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)