From: "Brendan Trotter" <btrotter@gmail.com>
To: "Keith Owens" <kaos@sgi.com>
Cc: "Andi Kleen" <ak@suse.de>, "Ashok Raj" <ashok.raj@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: NMI problems with Dell SMP Xeons
Date: Wed, 7 Jun 2006 15:18:57 +0000 [thread overview]
Message-ID: <b1ebdcad0606070818l3024b264k89f6cd37ccb0b6f7@mail.gmail.com> (raw)
In-Reply-To: <8446.1149666227@kao2.melbourne.sgi.com>
Hi,
On 6/7/06, Keith Owens <kaos@sgi.com> wrote:
> This problem is not KDB specific, although that is where it was first
> noticed. Any code that sends a broadcast IPI 2 or an NMI IPI will
> crash these Dell boxes when there is a mismatch between the cpus known
> to the BIOS and the cpus known to the OS.
I missed this (broadcast IPI 2 causing problems)...
Before the OS starts all AP CPUs should be in a special halt state
(specifically "cli; hlt"), where the only interrupt sources that reach
the CPU are NMI, SMI and INIT. This is why broadcast NMI is unsafe for
a variety of reasons (not just on Dells).
If the Dell machines allow an IPI 2 to get through then unused CPUs
aren't in the "cli; hlt" state, and they would also respond to any
other broadcast IPIs. This would imply that any code that uses
send_IPI_allbutself(), send_IPI_all() or anything else that sends
broadcast IPIs would/could cause problems on these Dell machines.
Depending on whether Linux leaves the real mode IVT intact or not and
which interrupt vector/s are used, the result could be nothing at all,
erratic behaviour, triple faults/resets, or executing unintended BIOS
functions (which could also trash memory or in some cases cause device
failure).
The easiest solution here would be for Dell to release an updated BIOS
that fixes this bug (i.e. puts the AP CPUs into a "cli; hlt" state, as
per Intel's notes in section 7.5.4.2 "Typical AP Initialization
Sequence" of the system programming guide). This still won't/shouldn't
fix the "broadcast NMI" problem though.
> I will try forcing send_IPI_allbutself() to use the mask version rather
> than the broadcast shortcut. Later tonight ...
I've been looking into this a little - it appears that Linux tries to
use one bit per CPU in the local APIC's "logical destination register"
and that in all cases at least one bit is set for each valid CPU. As
far as I can tell sending an NMI (or any other broadcast IPI) in
logical mode with no shorthand and "destination = 0xFF" should work
fine for both "cluster mode" and "flat mode". In this case I'd also
suggest that "clear_local_APIC()" clear the destination format
register (DFR) and the logical destination register (LDR) so that it
doesn't receive broadcast NMIs if the CPU is taken offline.
The "send_IPI_mask_sequence()" function also seems like a perfectly
valid option (except for the comments, which are easy enough to
change). IMHO it's just not as pretty, especially if it's to be used
for all broadcast IPIs (rather than just for broadcast NMIs) - I'd be
tempted to do an "#ifdef BORKED_DELL" around it in that case. :-)
Cheers,
Brendan
next prev parent reply other threads:[~2006-06-07 15:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-22 9:08 Keith Owens
2006-05-22 23:56 ` Andi Kleen
2006-05-23 1:26 ` Keith Owens
2006-05-23 1:55 ` Andi Kleen
2006-05-23 2:02 ` Keith Owens
2006-05-23 2:21 ` Keith Owens
2006-05-23 5:03 ` Keith Owens
2006-06-07 4:49 ` Keith Owens
2006-06-07 7:20 ` Andi Kleen
2006-06-07 7:43 ` Keith Owens
2006-06-07 8:01 ` Andi Kleen
2006-06-07 11:47 ` Keith Owens
2006-06-07 12:13 ` Andi Kleen
2006-06-07 15:18 ` Brendan Trotter [this message]
2006-06-07 15:23 ` Andi Kleen
2006-06-07 18:47 ` Rajesh Shah
2006-06-08 0:41 ` Rajesh Shah
2006-06-08 0:46 ` Rajesh Shah
2006-06-08 5:11 ` Keith Owens
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=b1ebdcad0606070818l3024b264k89f6cd37ccb0b6f7@mail.gmail.com \
--to=btrotter@gmail.com \
--cc=ak@suse.de \
--cc=ashok.raj@intel.com \
--cc=kaos@sgi.com \
--cc=linux-kernel@vger.kernel.org \
/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®