diff mbox

[1/2] sPAPR: Revert don't enable EEH on emulated PCI devices

Message ID 1442561444-31787-1-git-send-email-gwshan@linux.vnet.ibm.com
State New
Headers show

Commit Message

Gavin Shan Sept. 18, 2015, 7:30 a.m. UTC
This reverts commit 7cb18007 ("sPAPR: Don't enable EEH on emulated
PCI devices") as rtas_ibm_set_eeh_option() isn't the right place
to check if there has the corresponding PCI device for the input
address, which can be PE address, not PCI device address.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
 hw/ppc/spapr_pci.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

David Gibson Sept. 18, 2015, 7:42 a.m. UTC | #1
On Fri, Sep 18, 2015 at 05:30:43PM +1000, Gavin Shan wrote:
> This reverts commit 7cb18007 ("sPAPR: Don't enable EEH on emulated
> PCI devices") as rtas_ibm_set_eeh_option() isn't the right place
> to check if there has the corresponding PCI device for the input
> address, which can be PE address, not PCI device address.
> 
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>

Applied to spapr-dev, thanks.  I've altered it slightly because I
haven't yet applied your other EEH rework patches.
diff mbox

Patch

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 5e63ee5..a42365a 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -431,7 +431,6 @@  static void rtas_ibm_set_eeh_option(PowerPCCPU *cpu,
                                     target_ulong rets)
 {
     sPAPRPHBState *sphb;
-    PCIDevice *pdev;
     uint32_t addr, option;
     uint64_t buid;
     int ret;
@@ -449,12 +448,6 @@  static void rtas_ibm_set_eeh_option(PowerPCCPU *cpu,
         goto param_error_exit;
     }
 
-    pdev = pci_find_device(PCI_HOST_BRIDGE(sphb)->bus,
-                           (addr >> 16) & 0xFF, (addr >> 8) & 0xFF);
-    if (!pdev || !object_dynamic_cast(OBJECT(pdev), "vfio-pci")) {
-        goto param_error_exit;
-    }
-
     ret = spapr_phb_vfio_eeh_set_option(sphb, addr, option);
     rtas_st(rets, 0, ret);
     return;