From: Alok Kataria <akataria@vmware.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com,
linux-kernel@vger.kernel.org, Daniel Arai <arai@vmware.com>,
Zachary Amsden <zach@vmware.com>
Subject: Re: [PATCH] Fix paranoia about using BIOS quickboot mechanism.
Date: Mon, 07 Apr 2008 11:38:33 -0700 [thread overview]
Message-ID: <1207593513.5864.25.camel@promb-2n-dhcp158.eng.vmware.com> (raw)
In-Reply-To: <20080407082256.GA3524@elte.hu>
[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]
On Mon, 2008-04-07 at 10:22 +0200, Ingo Molnar wrote:
> * Alok Kataria <akataria@vmware.com> wrote:
>
> > Make sure that we clear the "shutdown status flag" in the CMOS
> > register after each CPU is brought up. This fixes a problem where the
> > "shutdown status flag" may remain set when a CPU is brought up after
> > booting.
>
> btw., what problem does this result in, exactly?
The shutdown status flag set to "0xA", corresponds to "JMP double word
request without INT init".
This JMP at reboot time is at an unintended location. And results in
Triple faults in our case.
Though this error at reboot can be safely ignored in a VM environment,
am not sure what the effect would be on a physical system. May be it
will result in a triple fault and an eventual hardware reset thus
masking this BUG in the kernel.
This fix just makes sure that we reset that status flag after
initialization is done.
>
> > Tested on the X86 tree.
>
> > + * Cleanup possible dangling ends...
> > + */
> > + smpboot_restore_warm_reset_vector();
> > +
> > return boot_error;
> > }
>
> patch got whitespace damaged - have a look at
> Documentation/email-clients.txt for details about how to send patches as
> in-line text. (or send the patch as an attachment - we accept x86
> patches as attachments too)
Ah...I think i followed the instructions there, will have to look what
went wrong, anyways, will go for the easier solution, here is the patch
attached.
Thanks & Regards,
Alok
>
> Ingo
[-- Attachment #2: fix-reboot-after-cpu-hotplug.patch --]
[-- Type: text/x-patch, Size: 1190 bytes --]
Fix paranoia about using BIOS quickboot mechanism.
Make sure that we clear the "shutdown status flag" in the CMOS register
after each CPU is brought up. This fixes a problem where the "shutdown
status flag" may remain set when a CPU is brought up after booting.
Signed-off-by: Alok N Kataria <akataria@vmware.com>
Signed-off-by: Dan Arai <arai@vmware.com>
---
arch/x86/kernel/smpboot.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 5321e35..0b8bba8 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1010,6 +1010,11 @@ do_rest:
/* mark "stuck" area as not stuck */
*((volatile unsigned long *)trampoline_base) = 0;
+ /*
+ * Cleanup possible dangling ends...
+ */
+ smpboot_restore_warm_reset_vector();
+
return boot_error;
}
@@ -1263,11 +1268,6 @@ void __init native_smp_prepare_boot_cpu(void)
void __init native_smp_cpus_done(unsigned int max_cpus)
{
- /*
- * Cleanup possible dangling ends...
- */
- smpboot_restore_warm_reset_vector();
-
Dprintk("Boot done.\n");
impress_friends();
--
1.5.4
next prev parent reply other threads:[~2008-04-07 18:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-04 23:49 Alok Kataria
2008-04-07 8:22 ` Ingo Molnar
2008-04-07 18:38 ` Alok Kataria [this message]
2008-04-08 20:48 ` Alok Kataria
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=1207593513.5864.25.camel@promb-2n-dhcp158.eng.vmware.com \
--to=akataria@vmware.com \
--cc=arai@vmware.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=zach@vmware.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®