linux-stable/arch/x86
Don Zickus b227e23399 x86, nmi: Add in logic to handle multiple events and unknown NMIs
Previous patches allow the NMI subsystem to process multipe NMI events
in one NMI.  As previously discussed this can cause issues when an event
triggered another NMI but is processed in the current NMI.  This causes the
next NMI to go unprocessed and become an 'unknown' NMI.

To handle this, we first have to flag whether or not the NMI handler handled
more than one event or not.  If it did, then there exists a chance that
the next NMI might be already processed.  Once the NMI is flagged as a
candidate to be swallowed, we next look for a back-to-back NMI condition.

This is determined by looking at the %rip from pt_regs.  If it is the same
as the previous NMI, it is assumed the cpu did not have a chance to jump
back into a non-NMI context and execute code and instead handled another NMI.

If both of those conditions are true then we will swallow any unknown NMI.

There still exists a chance that we accidentally swallow a real unknown NMI,
but for now things seem better.

An optimization has also been added to the nmi notifier rountine.  Because x86
can latch up to one NMI while currently processing an NMI, we don't have to
worry about executing _all_ the handlers in a standalone NMI.  The idea is
if multiple NMIs come in, the second NMI will represent them.  For those
back-to-back NMI cases, we have the potentail to drop NMIs.  Therefore only
execute all the handlers in the second half of a detected back-to-back NMI.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1317409584-23662-5-git-send-email-dzickus@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-10-10 06:57:01 +02:00
..
boot x86, build: Do not set the root_dev field in bzImage 2011-05-25 12:46:05 -07:00
configs cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
crypto crypto: ghash-intel - Fix set but not used in ghash_async_setkey() 2011-06-30 07:43:42 +08:00
ia32 All Arch: remove linkage for sys_nfsservctl system call 2011-08-26 15:09:58 -07:00
include/asm x86, nmi: Add in logic to handle multiple events and unknown NMIs 2011-10-10 06:57:01 +02:00
kernel x86, nmi: Add in logic to handle multiple events and unknown NMIs 2011-10-10 06:57:01 +02:00
kvm KVM: x86 emulator: fix Src2CL decode 2011-09-25 19:14:58 +03:00
lguest lguest: Fix translation count about wikipedia's cpuid page 2011-07-22 14:39:50 +09:30
lib atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
math-emu
mm x86: fix mm/fault.c build 2011-08-15 19:10:50 -07:00
net net: filter: Just In Time compiler for x86-64 2011-04-27 23:05:08 -07:00
oprofile x86, nmi: Wire up NMI handlers to new routines 2011-10-10 06:56:57 +02:00
pci Fix pointer dereference before call to pcie_bus_configure_settings 2011-09-09 19:49:58 -07:00
platform x86/rtc: Don't recursively acquire rtc_lock 2011-09-21 16:16:09 +02:00
power
tools
vdso Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-08-23 18:09:08 -07:00
video
xen Merge branch 'stable/bug.fixes' of git://oss.oracle.com/git/kwilk/xen 2011-09-16 11:28:11 -07:00
.gitignore
Kbuild net: filter: Just In Time compiler for x86-64 2011-04-27 23:05:08 -07:00
Kconfig Merge commit 'v3.0' into x86/vdso 2011-08-04 16:13:20 -07:00
Kconfig.cpu x86: Add support for cmpxchg_double 2011-06-25 12:17:32 -07:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile
Makefile_32.cpu x86, cpu: Move AMD Elan Kconfig under "Processor family" 2011-04-08 13:01:25 -07:00