Paolo Bonzini 9175d2e97b KVM: vmx: fix underflow in TSC deadline calculation
If the TSC deadline timer is programmed really close to the deadline or
even in the past, the computation in vmx_set_hv_timer can underflow and
cause delta_tsc to be set to a huge value.  This generally results
in vmx_set_hv_timer returning -ERANGE, but we can fix it by limiting
delta_tsc to be positive or zero.

Reported-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-07-01 11:03:39 +02:00
..
2016-05-27 15:57:31 -07:00
2016-05-24 10:22:34 -07:00
2016-03-31 13:35:10 +02:00
2016-04-20 10:36:57 +02:00
2016-04-20 10:36:57 +02:00
2016-05-24 10:22:34 -07:00
2016-04-22 10:29:07 +02:00