]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: selftests: Honor "stop" request in dirty ring test
authorSean Christopherson <seanjc@google.com>
Sat, 11 Jan 2025 00:29:53 +0000 (16:29 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 12 Feb 2025 17:00:55 +0000 (09:00 -0800)
commitf3629c0ef167aec0eb069cff2526cd54e966b5d8
treea429fb10d8e838645b36ed0d551e8fe30137d350
parentdeb8b8400e31505e0c151dcc4cf436863df4f8d9
KVM: selftests: Honor "stop" request in dirty ring test

Now that the vCPU doesn't dirty every page on the first iteration for
architectures that support the dirty ring, honor vcpu_stop in the dirty
ring's vCPU worker, i.e. stop when the main thread says "stop".  This will
allow plumbing vcpu_stop into the guest so that the vCPU doesn't need to
periodically exit to userspace just to see if it should stop.

Add a comment explaining that marking all pages as dirty is problematic
for the dirty ring, as it results in the guest getting stuck on "ring
full".  This could be addressed by adding a GUEST_SYNC() in that initial
loop, but it's not clear how that would interact with s390's behavior.

Link: https://lore.kernel.org/r/20250111003004.1235645-10-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/dirty_log_test.c