Re: [Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-28 Thread Alexander Graf
On 28.05.14 23:54, Benjamin Herrenschmidt wrote: On Wed, 2014-05-28 at 13:24 +0200, Alexander Graf wrote: int (*eeh_handler)(PCIDevice *pdev, int opcode, int option); If we need a PCI device level callback, yes. I think a PCI device level callback is preferable regardless of whether the c

Re: [Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-28 Thread Benjamin Herrenschmidt
On Wed, 2014-05-28 at 13:24 +0200, Alexander Graf wrote: > >int (*eeh_handler)(PCIDevice *pdev, int opcode, int option); > > If we need a PCI device level callback, yes. I think a PCI device level callback is preferable regardless of whether the current VFIO creates a PHB for a group/domain/P

Re: [Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-28 Thread Alexander Graf
On 28.05.14 14:33, Gavin Shan wrote: On Wed, May 28, 2014 at 01:24:15PM +0200, Alexander Graf wrote: On 28.05.14 06:12, Gavin Shan wrote: On Wed, May 28, 2014 at 12:41:37AM +0200, Alexander Graf wrote: On 28.05.14 00:27, Benjamin Herrenschmidt wrote: On Wed, 2014-05-28 at 00:22 +0200, Alexan

Re: [Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-28 Thread Gavin Shan
On Wed, May 28, 2014 at 01:24:15PM +0200, Alexander Graf wrote: > >On 28.05.14 06:12, Gavin Shan wrote: >>On Wed, May 28, 2014 at 12:41:37AM +0200, Alexander Graf wrote: >>>On 28.05.14 00:27, Benjamin Herrenschmidt wrote: On Wed, 2014-05-28 at 00:22 +0200, Alexander Graf wrote: >>.../... >> >>>

Re: [Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-28 Thread Alexander Graf
On 28.05.14 06:12, Gavin Shan wrote: On Wed, May 28, 2014 at 12:41:37AM +0200, Alexander Graf wrote: On 28.05.14 00:27, Benjamin Herrenschmidt wrote: On Wed, 2014-05-28 at 00:22 +0200, Alexander Graf wrote: .../... In any case, the above isn't the problem, we register rtas functions called

Re: [Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-27 Thread Gavin Shan
On Wed, May 28, 2014 at 12:41:37AM +0200, Alexander Graf wrote: >On 28.05.14 00:27, Benjamin Herrenschmidt wrote: >>On Wed, 2014-05-28 at 00:22 +0200, Alexander Graf wrote: .../... >>In any case, the above isn't the problem, we register rtas functions >>called rtas_ibm_*, that's fine. > >They're

Re: [Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-27 Thread Alexander Graf
On 28.05.14 00:27, Benjamin Herrenschmidt wrote: On Wed, 2014-05-28 at 00:22 +0200, Alexander Graf wrote: +void spapr_eeh_rtas_init(sPAPREnvironment *spapr) +{ +spapr_rtas_register("ibm,set-eeh-option", +rtas_ibm_set_eeh_option); +spapr_rtas_register("ibm,get-con

Re: [Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-27 Thread Benjamin Herrenschmidt
On Wed, 2014-05-28 at 00:22 +0200, Alexander Graf wrote: > > +void spapr_eeh_rtas_init(sPAPREnvironment *spapr) > > +{ > > +spapr_rtas_register("ibm,set-eeh-option", > > +rtas_ibm_set_eeh_option); > > +spapr_rtas_register("ibm,get-config-addr-info2", > > +

Re: [Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-27 Thread Alexander Graf
On 27.05.14 10:51, Gavin Shan wrote: The patch introduces EEH RTAS servers on sPAPR platform and handle them there. Each sPAPRPHBVFIOState is binding with only one IOMMU group, so it can be regarded as PE in nature. The PE address is maintained in sPAPRPHBState, which has default value 0xfff

[Qemu-devel] [PATCH v7 3/3] sPAPR: EEH support for VFIO PCI device

2014-05-27 Thread Gavin Shan
The patch introduces EEH RTAS servers on sPAPR platform and handle them there. Each sPAPRPHBVFIOState is binding with only one IOMMU group, so it can be regarded as PE in nature. The PE address is maintained in sPAPRPHBState, which has default value 0x for non-VFIO PHBs. Otherwise, the PE a