diff options
| author | Sean Christopherson <seanjc@google.com> | 2024-11-27 16:55:41 -0800 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2024-12-18 14:14:59 -0800 |
| commit | 3a042252640450fd288c56953bf21583d5198fba (patch) | |
| tree | f72560026be7512edbf29800bc9e7ca25309da68 | |
| parent | 8abe7632a1eebdfac2c553a21b4f980db416c166 (diff) | |
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>
| -rw-r--r-- | tools/testing/selftests/kvm/mmu_stress_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } } |
