]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: selftests: Randomize dirty_log_test's delay before reaping the bitmap
authorSean Christopherson <seanjc@google.com>
Fri, 22 May 2026 17:02:30 +0000 (10:02 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 26 May 2026 19:24:33 +0000 (12:24 -0700)
commit4e0fdd9b0d7d22bdde676fce10ffc22e7f4933ed
treeea1ee4b424f025d047957c7b6216ae074e7310b8
parent3e8a0b9912239026defe839291c669984c734650
KVM: selftests: Randomize dirty_log_test's delay before reaping the bitmap

In the dirty log test, randomize the delay before the initial call to get
the dirty log bitmap for a given iteration, so that the amount of memory
dirtied by the guest varies from iteration to iteration, and so that the
user can effectively control the duration (by increasing the interval).

Always waiting 1ms effectively hides a KVM RISC-V bug as the test reaps the
dirty bitmap before the guest has a chance to trigger the problematic flow
in KVM.

Reported-by: Wu Fei <wu.fei9@sanechips.com.cn>
Closes: https://lore.kernel.org/all/202605111130.64BBUXDN013040@mse-fl2.zte.com.cn
Cc: Wu Fei <atwufei@163.com>
Link: https://patch.msgid.link/20260522170230.3518669-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/dirty_log_test.c