[PATCH v7 0/3] EEH Support for VFIO PCI Device

2014-05-27 Thread Gavin Shan
The series of patches intends to support EEH for PCI devices, which are passed through to PowerKVM based guest via VFIO. The implementation is straightforward based on the issues or problems we have to resolve to support EEH for PowerKVM based guest. - Emulation for EEH RTAS requests. All EEH

[PATCH v7 2/3] powerpc/eeh: EEH support for VFIO PCI device

2014-05-27 Thread Gavin Shan
The patch exports functions to be used by new ioctl commands, which will be introduced in subsequent patch, to support EEH functinality for VFIO PCI device. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h | 15 +++ arch/powerpc/kernel/eeh.c | 286

[PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Gavin Shan
The patch adds new IOCTL commands for sPAPR VFIO container device to support EEH functionality for PCI devices, which have been passed through from host to somebody else via VFIO. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com --- Documentation/vfio.txt | 92

Re: [PATCH v6 2/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alex Williamson
On Sat, 2014-05-24 at 12:06 +1000, Gavin Shan wrote: On Fri, May 23, 2014 at 08:29:59AM -0600, Alex Williamson wrote: On Fri, 2014-05-23 at 14:37 +1000, Gavin Shan wrote: On Thu, May 22, 2014 at 09:10:53PM -0600, Alex Williamson wrote: On Thu, 2014-05-22 at 18:23 +1000, Gavin Shan wrote:

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alex Williamson
On Tue, 2014-05-27 at 18:40 +1000, Gavin Shan wrote: The patch adds new IOCTL commands for sPAPR VFIO container device to support EEH functionality for PCI devices, which have been passed through from host to somebody else via VFIO. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com ---

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Benjamin Herrenschmidt
On Tue, 2014-05-27 at 12:15 -0600, Alex Williamson wrote: +/* + * Reset is the major step to recover problematic PE. The following + * command helps on that. + */ +struct vfio_eeh_pe_reset { + __u32 argsz; + __u32 flags; + __u32 option; +#define

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alex Williamson
On Wed, 2014-05-28 at 06:30 +1000, Benjamin Herrenschmidt wrote: On Tue, 2014-05-27 at 12:15 -0600, Alex Williamson wrote: +/* + * Reset is the major step to recover problematic PE. The following + * command helps on that. + */ +struct vfio_eeh_pe_reset { + __u32 argsz; +

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Benjamin Herrenschmidt
On Tue, 2014-05-27 at 14:37 -0600, Alex Williamson wrote: The usual way is the driver asks for one or the other, this plumbs back into the guest EEH code which itself plumbs into the PCIe error recovery framework in Linux. So magic? Yes. The driver is expected to more or less knows what

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alexander Graf
On 27.05.14 20:15, Alex Williamson wrote: On Tue, 2014-05-27 at 18:40 +1000, Gavin Shan wrote: The patch adds new IOCTL commands for sPAPR VFIO container device to support EEH functionality for PCI devices, which have been passed through from host to somebody else via VFIO. Signed-off-by:

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alex Williamson
On Wed, 2014-05-28 at 00:49 +0200, Alexander Graf wrote: On 27.05.14 20:15, Alex Williamson wrote: On Tue, 2014-05-27 at 18:40 +1000, Gavin Shan wrote: The patch adds new IOCTL commands for sPAPR VFIO container device to support EEH functionality for PCI devices, which have been passed

Re: [PATCH v7 3/3] drivers/vfio: EEH support for VFIO PCI device

2014-05-27 Thread Alex Williamson
On Wed, 2014-05-28 at 02:44 +0200, Alexander Graf wrote: On 28.05.14 02:39, Alex Williamson wrote: On Wed, 2014-05-28 at 00:49 +0200, Alexander Graf wrote: On 27.05.14 20:15, Alex Williamson wrote: On Tue, 2014-05-27 at 18:40 +1000, Gavin Shan wrote: The patch adds new IOCTL commands for