[PATCH v3 11/14] KVM: selftests: Use vcpu_arch_put_guest() in mmu_stress_test
Sean Christopherson
seanjc at google.com
Wed Oct 9 08:49:50 PDT 2024
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 at google.com>
Signed-off-by: Sean Christopherson <seanjc at google.com>
---
tools/testing/selftests/kvm/mmu_stress_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/mmu_stress_test.c b/tools/testing/selftests/kvm/mmu_stress_test.c
index fbb693428a82..656a837c7f49 100644
--- a/tools/testing/selftests/kvm/mmu_stress_test.c
+++ b/tools/testing/selftests/kvm/mmu_stress_test.c
@@ -23,7 +23,7 @@ static void guest_code(uint64_t start_gpa, uint64_t end_gpa, uint64_t stride)
for (;;) {
for (gpa = start_gpa; gpa < end_gpa; gpa += stride)
- *((volatile uint64_t *)gpa) = gpa;
+ vcpu_arch_put_guest(*((volatile uint64_t *)gpa), gpa);
GUEST_SYNC(0);
}
}
--
2.47.0.rc0.187.ge670bccf7e-goog
More information about the linux-riscv
mailing list