From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsRYy-0005dy-3k for qemu-devel@nongnu.org; Thu, 05 Jun 2014 02:54:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsRYf-0005NL-1o for qemu-devel@nongnu.org; Thu, 05 Jun 2014 02:54:12 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:35182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsRYe-0005LI-79 for qemu-devel@nongnu.org; Thu, 05 Jun 2014 02:53:52 -0400 Received: from /spool/local by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Jun 2014 16:53:47 +1000 From: Gavin Shan Date: Thu, 5 Jun 2014 16:53:37 +1000 Message-Id: <1401951221-32613-1-git-send-email-gwshan@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v8 0/4] EEH Support for VFIO PCI Device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org Cc: aik@ozlabs.ru, qemu-devel@nongnu.org, agraf@suse.de, alex.williamson@redhat.com, qiudayu@linux.vnet.ibm.com, Gavin Shan The series of patches adds support EEH for VFIO PCI devices on sPAPR platform. It requires corresponding host kernel support. Also, it is based on top of Alexey's VFIO-for-sPAPR git repository. QEMU: git://github.com/aik/qemu.git (branch: vfio) Kernel: git://github.com/aik/linux.git (branch: vfio) Kernel: http://linuxppc.10917.n7.nabble.com/PATCH-v8-0-3-EEH-Support-for-VFIO-PCI-Device-td82940.html The implementations notes are below. Please comment. * RTAS calls are received in spapr_pci.c, sanity check is done there. RTAS handlers handle what they can. If there is something it cannot handle and sPAPRPHBClass::eeh_handler callback is defined, it is called. * sPAPRPHBClass::eeh_handler is only implemented for VFIO now. It does ioctl() to the IOMMU container fd to complete the call. Error codes from that ioctl() are transferred back to the guest. Gavin Shan (4): sPAPR: Implement EEH RTAS calls headers: Update kernel header VFIO: Introduce helper vfio_pci_container_ioctl() sPAPR: Implement sPAPRPHBClass::eeh_handler hw/misc/vfio.c | 31 ++++++ hw/ppc/spapr_pci.c | 248 ++++++++++++++++++++++++++++++++++++++++++++ hw/ppc/spapr_pci_vfio.c | 54 ++++++++++ include/hw/misc/vfio.h | 2 + include/hw/pci-host/spapr.h | 7 ++ include/hw/ppc/spapr.h | 33 ++++++ linux-headers/linux/vfio.h | 35 +++++++ 7 files changed, 410 insertions(+) -- 1.8.3.2