KVM: selftests: Add helper to generate random u64 in range [min,max]

Introduce kvm_random_u64_in_range(state, min, max). This function
returns a random u64 in the inclusive range of [min, max] using a struct
kvm_random_state.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Josh Hilke <jrhilke@google.com>
Link: https://patch.msgid.link/20260626213534.3866178-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
Josh Hilke 2026-06-26 14:35:19 -07:00 • committed by Sean Christopherson
commit c772591d27
2 changed files with 21 additions and 0 deletions