[lkml]   [2020]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] KVM: x86: fix WARN_ON check of an unsigned less than zero
Paolo Bonzini <> writes:
> The check cpu->hv_clock.system_time < 0 is redundant since system_time is a u64 and hence can never be less than zero. But what was actually meant is to check that the result is positive, since kernel_ns and
> v->kvm->arch.kvmclock_offset are both s64.
>Reported-by: Colin King <>
>Suggested-by: Sean Christopherson <>
>Addresses-Coverity: ("Macro compares unsigned to 0")
>Signed-off-by: Paolo Bonzini <>

Reviewed-by: Miaohe Lin <>

 \ /
  Last update: 2020-02-12 13:48    [W:0.025 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site