mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Matt Mackall <mpm@selenic.com>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] lguest: fix TSC "divide error: 0000 [#1]" boot crash
Date: Fri, 29 Jun 2007 11:30:33 +1000	[thread overview]
Message-ID: <1183080633.7803.10.camel@localhost.localdomain> (raw)

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@rustcorp.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;
 



                 reply	other threads:[~2007-06-29  1:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1183080633.7803.10.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®