• G
    powerpc/eeh: Enhance pcibios_set_pcie_reset_state() · 28158cd1
    Gavin Shan 提交于
    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: NPriya M. A <priyama2@in.ibm.com>
    Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
    Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
    28158cd1
eeh.c 44.4 KB