Kevin Pedretti b33ac88b4c KVM: Fix local apic timer divide by zero
kvm_lapic_reset() was initializing apic->timer.divide_count to 0,
which could potentially lead to a divide by zero error in
apic_get_tmcct().  Any guest that reads the APIC's CCR (current count)
register before setting DCR (divide configuration) would trigger a divide
by zero exception in the host kernel, leading to a host-OS crash.

This patch results in apic->timer.divide_count being initialized to
2 at reset, eliminating the bug (DCR=0 at reset, meaning divide by 2).

Signed-off-by: Kevin Pedretti <kevin.pedretti@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-10-22 12:03:29 +02:00
..
2007-10-17 08:42:52 -07:00
2007-08-22 19:52:46 -07:00
2007-10-18 14:37:31 -07:00
2007-10-16 09:43:09 -07:00
2007-10-20 01:55:04 +02:00
2007-10-19 11:53:42 -07:00
2007-10-20 00:47:32 +02:00
2007-10-20 01:34:40 +02:00
2007-10-19 23:22:55 +02:00
2007-10-20 01:55:58 +02:00
2007-10-19 23:22:11 +02:00
2007-10-20 01:34:40 +02:00
2007-10-20 01:34:40 +02:00
2007-10-20 01:34:40 +02:00
2007-10-19 11:53:41 -07:00
2007-10-19 11:53:41 -07:00
2007-10-20 01:34:40 +02:00
2007-10-20 15:04:06 -07:00
2007-10-19 23:22:55 +02:00
2007-10-16 21:04:11 -04:00
2007-10-17 08:42:57 -07:00
2007-10-20 01:34:40 +02:00
2007-10-18 10:39:03 +00:00