[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1183080633.7803.10.camel@localhost.localdomain>
Date: Fri, 29 Jun 2007 11:30:33 +1000
From: Rusty Russell <rusty@...tcorp.com.au>
To: Matt Mackall <mpm@...enic.com>
Cc: lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] lguest: fix TSC "divide error: 0000 [#1]" boot crash
Configuring a guest with < CONFIG_M586TSC reveals an lguest bug: the
TSC code expects to see the TSC capability bit, but we weren't setting
up the capabilities until much later in check_bugs ->
identify_boot_cpu -> identify_boot_cpu.
Do the same thing as Xen and the head.S native code: populate the
first capability word before start_kernel().
Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
diff -r 7743cd1639b7 drivers/lguest/lguest.c
--- a/drivers/lguest/lguest.c Thu Jun 28 23:21:41 2007 +1000
+++ b/drivers/lguest/lguest.c Fri Jun 29 06:23:59 2007 +1000
@@ -598,6 +598,9 @@ __init void lguest_init(void *boot)
paravirt_disable_iospace();
cpu_detect(&new_cpu_data);
+ /* head.S usually sets up the first capability word, so do it here. */
+ new_cpu_data.x86_capability[0] = cpuid_edx(1);
+
/* Math is always hard! */
new_cpu_data.hard_math = 1;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists