powerpc/eeh: Enhance pcibios_set_pcie_reset_state()
Function pcibios_set_pcie_reset_state() is possibly called by
pci_reset_function(), on which VFIO infrastructure depends to
issue reset. pcibios_set_pcie_reset_state() is issuing reset
on the parent PE of the indicated PCI device. The reset causes
state lost on all PCI devices except the indicated one as the
argument to pcibios_set_pcie_reset_state(). Also, sideband
MMIO access from guest when issuing reset would cause unexpected
EEH error.
For above two issues, the patch applies following enhancements
to pcibios_set_pcie_reset_state():
   * For all PCI devices except the indicated one, save their
     state prior to reset and restore state after that.
   * Explicitly freeze PE prior to reset and unfreeze it after
     that, in order to avoid unexpected EEH error.
Tested-by:  Priya M. A <priyama2@in.ibm.com>
Signed-off-by:
Priya M. A <priyama2@in.ibm.com>
Signed-off-by:  Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by:
Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by:  Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Loading
Please register or sign in to comment
