linux/arch/powerpc
Gavin Shan 9365bd6c13 powerpc/eeh: Restore initial state in eeh_pe_reset_and_recover()
[ Upstream commit 5a0cdbfd17 ]

The function eeh_pe_reset_and_recover() is used to recover EEH
error when the passthrou device are transferred to guest and
backwards. The content in the device's config space will be lost
on PE reset issued in the middle of the recovery. The function
saves/restores it before/after the reset. However, config access
to some adapters like Broadcom BCM5719 at this point will causes
fenced PHB. The config space is always blocked and we save 0xFF's
that are restored at late point. The memory BARs are totally
corrupted, causing another EEH error upon access to one of the
memory BARs.

This restores the config space on those adapters like BCM5719
from the content saved to the EEH device when it's populated,
to resolve above issue.

Fixes: 5cfb20b9 ("powerpc/eeh: Emulate EEH recovery for VFIO devices")
Cc: stable@vger.kernel.org #v3.18+
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2016-06-06 19:11:04 -04:00
..
boot powerpc/mpc85xx: Add ranges to etsec2 nodes 2015-04-16 20:13:18 -04:00
configs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux 2014-10-21 07:48:56 -07:00
crypto crypto: add missing crypto module aliases 2015-01-29 17:40:46 -08:00
include mm: fix huge zero page accounting in smaps report 2016-06-03 11:30:36 -04:00
kernel powerpc/eeh: Restore initial state in eeh_pe_reset_and_recover() 2016-06-06 19:11:04 -04:00
kvm KVM: PPC: Book3S HV: Sanitize special-purpose register values on guest exit 2016-03-22 11:11:13 -04:00
lib powerpc: Implement emulation of string loads and stores 2014-09-25 23:14:52 +10:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc/mm: Recompute hash value after a failed update 2015-10-07 10:14:35 -04:00
net net: filter: make JITs zero A for SKF_AD_ALU_XOR_X 2016-02-15 15:42:43 -05:00
oprofile powerpc: Ensure global functions include their prototype 2014-09-25 23:14:42 +10:00
perf powerpc/perf: Fix book3s kernel to userspace backtraces 2015-07-03 23:02:22 -04:00
platforms powerpc/powernv: Shorten EEH function names 2016-03-04 10:18:41 -05:00
sysdev powerpc/MSI: Fix race condition in tearing down MSI interrupts 2015-10-27 22:14:14 -04:00
xmon powerpc/xmon: Fix another endiannes issue in RTAS call from xmon 2015-02-05 22:36:03 -08:00
Kconfig powerpc/cell: Move spu_handle_mm_fault() out of cell platform 2014-10-08 20:14:54 +11:00
Kconfig.debug Patch queue for ppc - 2014-08-01 2014-08-05 09:58:11 +02:00
Makefile powerpc: Add POWER8 CPU selection 2014-09-25 23:14:49 +10:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00