All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] sPAPR: Revert don't enable EEH on emulated PCI devices
@ 2015-09-18  7:30 Gavin Shan
  2015-09-18  7:30 ` [Qemu-devel] [PATCH 2/2] sPAPR: Enable EEH on VFIO PCI device only Gavin Shan
  2015-09-18  7:42 ` [Qemu-devel] [PATCH 1/2] sPAPR: Revert don't enable EEH on emulated PCI devices David Gibson
  0 siblings, 2 replies; 4+ messages in thread
From: Gavin Shan @ 2015-09-18  7:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, Gavin Shan, david

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(-)

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;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 2/2] sPAPR: Enable EEH on VFIO PCI device only
  2015-09-18  7:30 [Qemu-devel] [PATCH 1/2] sPAPR: Revert don't enable EEH on emulated PCI devices Gavin Shan
@ 2015-09-18  7:30 ` Gavin Shan
  2015-09-18  7:43   ` David Gibson
  2015-09-18  7:42 ` [Qemu-devel] [PATCH 1/2] sPAPR: Revert don't enable EEH on emulated PCI devices David Gibson
  1 sibling, 1 reply; 4+ messages in thread
From: Gavin Shan @ 2015-09-18  7:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, Gavin Shan, david

This checks if the PCI device retrieved from the PCI device address
is VFIO PCI device when enabling EEH functionality. If it's not
VFIO PCI device, the EEH functonality isn't enabled.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
 hw/ppc/spapr_pci_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c
index a99c7b3..b20e6e9 100644
--- a/hw/ppc/spapr_pci_vfio.c
+++ b/hw/ppc/spapr_pci_vfio.c
@@ -131,7 +131,7 @@ int spapr_phb_vfio_eeh_set_option(sPAPRPHBState *sphb,
         phb = PCI_HOST_BRIDGE(sphb);
         pdev = pci_find_device(phb->bus,
                                (addr >> 16) & 0xFF, (addr >> 8) & 0xFF);
-        if (!pdev) {
+        if (!pdev || !object_dynamic_cast(OBJECT(pdev), "vfio-pci")) {
             return RTAS_OUT_PARAM_ERROR;
         }
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] sPAPR: Revert don't enable EEH on emulated PCI devices
  2015-09-18  7:30 [Qemu-devel] [PATCH 1/2] sPAPR: Revert don't enable EEH on emulated PCI devices Gavin Shan
  2015-09-18  7:30 ` [Qemu-devel] [PATCH 2/2] sPAPR: Enable EEH on VFIO PCI device only Gavin Shan
@ 2015-09-18  7:42 ` David Gibson
  1 sibling, 0 replies; 4+ messages in thread
From: David Gibson @ 2015-09-18  7:42 UTC (permalink / raw)
  To: Gavin Shan; +Cc: qemu-ppc, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

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.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] sPAPR: Enable EEH on VFIO PCI device only
  2015-09-18  7:30 ` [Qemu-devel] [PATCH 2/2] sPAPR: Enable EEH on VFIO PCI device only Gavin Shan
@ 2015-09-18  7:43   ` David Gibson
  0 siblings, 0 replies; 4+ messages in thread
From: David Gibson @ 2015-09-18  7:43 UTC (permalink / raw)
  To: Gavin Shan; +Cc: qemu-ppc, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

On Fri, Sep 18, 2015 at 05:30:44PM +1000, Gavin Shan wrote:
> This checks if the PCI device retrieved from the PCI device address
> is VFIO PCI device when enabling EEH functionality. If it's not
> VFIO PCI device, the EEH functonality isn't enabled.
> 
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>

Applied to spapr-dev, thanks.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-18  7:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-18  7:30 [Qemu-devel] [PATCH 1/2] sPAPR: Revert don't enable EEH on emulated PCI devices Gavin Shan
2015-09-18  7:30 ` [Qemu-devel] [PATCH 2/2] sPAPR: Enable EEH on VFIO PCI device only Gavin Shan
2015-09-18  7:43   ` David Gibson
2015-09-18  7:42 ` [Qemu-devel] [PATCH 1/2] sPAPR: Revert don't enable EEH on emulated PCI devices David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.