]> git.ipfire.org Git - people/arne_f/kernel.git/commit
x86, apic: Handle a bad TSC more gracefully
authorAndy Lutomirski <luto@amacapital.net>
Wed, 15 Oct 2014 17:12:07 +0000 (10:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 18:10:38 +0000 (10:10 -0800)
commitf3cacd25d3b3f626dcd12df1bd93851e48076a36
treeaebe5b9beff2142f5e2114e7a13d07c06e0010f2
parenta91da4eefe313bbd39c855fdb5b1765c85731d7a
x86, apic: Handle a bad TSC more gracefully

commit b47dcbdc5161d3d5756f430191e2840d9b855492 upstream.

If the TSC is unusable or disabled, then this patch fixes:

 - Confusion while trying to clear old APIC interrupts.
 - Division by zero and incorrect programming of the TSC deadline
   timer.

This fixes boot if the CPU has a TSC deadline timer but a missing or
broken TSC.  The failure to boot can be observed with qemu using
-cpu qemu64,-tsc,+tsc-deadline

This also happens to me in nested KVM for unknown reasons.
With this patch, I can boot cleanly (although without a TSC).

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Bandan Das <bsd@redhat.com>
Link: http://lkml.kernel.org/r/e2fa274e498c33988efac0ba8b7e3120f7f92d78.1413393027.git.luto@amacapital.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/apic/apic.c
arch/x86/kernel/tsc.c