Commit 3a042252 authored by Sean Christopherson's avatar Sean Christopherson
Browse files

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: default avatarJames Houghton <jthoughton@google.com>
Reviewed-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20241128005547.4077116-11-seanjc@google.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 8abe7632
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}
}