From: Kevin Pedretti Date: Sun, 21 Oct 2007 06:54:53 +0000 (+0200) Subject: KVM: Fix local apic timer divide by zero X-Git-Tag: v2.6.24-rc1~59^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b33ac88b4c23330043acad930517282eb486db1d;p=pandora-kernel.git 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 Signed-off-by: Avi Kivity --- Reading git-diff-tree failed