]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: handle idiv overflow at kvm_write_tsc
authorMarcelo Tosatti <mtosatti@redhat.com>
Wed, 12 Jun 2013 02:31:12 +0000 (23:31 -0300)
committerGleb Natapov <gleb@redhat.com>
Wed, 12 Jun 2013 11:24:11 +0000 (14:24 +0300)
commitad516f1d74703d1350de945838a50228535cf8a7
tree1ff764deecb8f617e74579c46341dce7682ff615
parentfd67260341a18e65a885b8a7045d0e01cdf0733d
KVM: x86: handle idiv overflow at kvm_write_tsc

Its possible that idivl overflows (due to large delta stored in usdiff,
valid scenario).

Create an exception handler to catch the overflow exception (division by zero
is protected by vcpu->arch.virtual_tsc_khz check), and interpret it accordingly
(delta is larger than USEC_PER_SEC).

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=969644

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
arch/x86/kvm/x86.c