KVM: x86: fix WARN_ON check of an unsigned less than zero
linmiaohe
Reviewed-byQuoted 8 lines · Paolo Bonzini
The check
cpu->hv_clock.system_time< 0 is redundant sincesystem_timeis a u64 and hence can never be less than zero. But what was actually meant is to check that the result is positive, sincekernel_nsandv->kvm->arch.kvmclock_offsetare both s64.Reported-by Colin King <[email protected]>Suggested-by Sean Christopherson <[email protected]>Addresses-Coverity: ("Macro compares unsigned to 0")
Signed-off-by Paolo Bonzini <[email protected]>---
Reviewed-by Miaohe Lin <[email protected]>