Skip to content
  • Gavin Shan's avatar
    powerpc/eeh: Fix race condition in pcibios_set_pcie_reset_state() · 1ae79b78
    Gavin Shan authored
    When asserting reset in pcibios_set_pcie_reset_state(), the PE
    is enforced to (hardware) frozen state in order to drop unexpected
    PCI transactions (except PCI config read/write) automatically by
    hardware during reset, which would cause recursive EEH error.
    However, the (software) frozen state EEH_PE_ISOLATED is missed.
    When users get 0xFF from PCI config or MMIO read, EEH_PE_ISOLATED
    is set in PE state retrival backend. Unfortunately, nobody (the
    reset handler or the EEH recovery functinality in host) will clear
    EEH_PE_ISOLATED when the PE has been passed through to guest.
    
    The patch sets and clears EEH_PE_ISOLATED properly during reset
    in function pcibios_set_pcie_reset_state() to fix the issue.
    
    Fixes: 28158cd1
    
     ("Enhance pcibios_set_pcie_reset_state()")
    Reported-by: default avatarCarol L. Soto <clsoto@us.ibm.com>
    Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
    Tested-by: default avatarCarol L. Soto <clsoto@us.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    1ae79b78