linux/arch/x86
Xie XiuQi 1b48465500 x86/mce: Reenable CMCI banks when swiching back to interrupt mode
Zhang Liguang reported the following issue:

1) System detects a CMCI storm on the current CPU.

2) Kernel disables the CMCI interrupt on banks owned by the
   current CPU and switches to poll mode

3) After the CMCI storm subsides, kernel switches back to
   interrupt mode

4) We expect the system to reenable the CMCI interrupt on banks
   owned by the current CPU

   mce_intel_adjust_timer
   |-> cmci_reenable
       |-> cmci_discover     # owned banks are ignored here

  static void cmci_discover(int banks)
	...
	for (i = 0; i < banks; i++) {
		...
		if (test_bit(i, owned))	# ownd banks is ignore here
			continue;

So convert cmci_storm_disable_banks() to
cmci_toggle_interrupt_mode() which controls whether to enable or
disable CMCI interrupts with its argument.

NB: We cannot clear the owned bit because the banks won't be
polled, otherwise. See:

  27f6c573e0 ("x86, CMCI: Add proper detection of end of CMCI storms")

for more info.

Reported-by: Zhang Liguang <zhangliguang@huawei.com>
Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org> # v3.15+
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: huawei.libin@huawei.com
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: rui.xiang@huawei.com
Link: http://lkml.kernel.org/r/1439396985-12812-10-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-08-13 10:12:52 +02:00
..
boot x86/efi: Use all 64 bit of efi_memmap in setup_e820() 2015-07-30 18:07:10 +01:00
configs kconfig: add xenconfig defconfig helper 2015-06-16 11:04:29 +01:00
crypto crypto: aesni - fix failing setkey for rfc4106-gcm-aesni 2015-06-29 16:06:30 +08:00
entry x86/asm/entry/32: Revert 'Do not use R9 in SYSCALL32' commit 2015-07-24 16:36:00 +02:00
ia32 Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:59:09 -07:00
include x86/mce: Clear Local MCE opt-in before kexec 2015-08-13 10:12:52 +02:00
kernel x86/mce: Reenable CMCI banks when swiching back to interrupt mode 2015-08-13 10:12:52 +02:00
kvm KVM: MTRR: Use default type for non-MTRR-covered gfn before WARN_ON 2015-08-05 11:57:57 +02:00
lguest Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:59:09 -07:00
lib perf/x86: Fix copy_from_user_nmi() return if range is not ok 2015-07-06 14:09:27 +02:00
math-emu x86/fpu: Harmonize FPU register state types 2015-05-19 15:48:09 +02:00
mm x86/mm/pat: Revert 'Adjust default caching mode translation tables' 2015-07-26 10:27:37 +02:00
net ebpf, x86: fix general protection fault when tail call is invoked 2015-07-29 17:02:19 -07:00
oprofile
pci PCI changes for the v4.2 merge window: 2015-06-23 13:41:24 -07:00
platform efi: Check for NULL efi kernel parameters 2015-07-30 18:07:11 +01:00
power x86/ldt: Make modify_ldt synchronous 2015-07-31 10:23:23 +02:00
purgatory
realmode
tools
um Merge branch 'for-linus-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2015-06-28 13:55:08 -07:00
video
xen x86/xen: Probe target addresses in set_aliased_prot() before the hypercall 2015-07-31 10:23:22 +02:00
.gitignore
Kbuild x86/asm/entry, x86/vdso: Move the vDSO code to arch/x86/entry/vdso/ 2015-06-03 18:51:37 +02:00
Kconfig x86/mce: Provide a lockless memory pool to save error records 2015-08-13 10:12:50 +02:00
Kconfig.cpu
Kconfig.debug x86/entry/64, x86/nmi/64: Add CONFIG_DEBUG_ENTRY NMI testing code 2015-07-17 12:50:14 +02:00
Makefile x86/asm/entry: Move the arch/x86/syscalls/ definitions to arch/x86/entry/syscalls/ 2015-06-04 07:37:37 +02:00
Makefile.um
Makefile_32.cpu