Received: from eggs.gnu.org ([2001:4830:134:3::10]:55027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsmOO-0003GH-ER for qemu-devel@nongnu.org; Fri, 06 Jun 2014 01:08:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsmOG-0005XH-QY for qemu-devel@nongnu.org; Fri, 06 Jun 2014 01:08:40 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:40295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsmOF-0005Vr-Ky for qemu-devel@nongnu.org; Fri, 06 Jun 2014 01:08:32 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Jun 2014 15:08:27 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 8870F2BB0054 for ; Fri, 6 Jun 2014 15:08:24 +1000 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s564qOFN22085688 for ; Fri, 6 Jun 2014 14:52:25 +1000 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5658NbC005979 for ; Fri, 6 Jun 2014 15:08:23 +1000 From: Gavin Shan Date: Fri, 6 Jun 2014 15:08:18 +1000 Message-Id: <1402031301-12393-1-git-send-email-gwshan@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v9 0/3] EEH Support for VFIO PCI Device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aik@ozlabs.ru, agraf@suse.de, Gavin Shan , alex.williamson@redhat.com, qiudayu@linux.vnet.ibm.com 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-v9-0-3-EEH-Support-for-VFIO-PCI-Device-td82984.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. Changelog ========= v8 -> v9: * Update kernel header (vfio.h) according to changes applied to kerenl. * Rename rtas_finish_eeh_request() to rtas_handle_eeh_request(). * vfio_pci_container_ioctl() moved to Alexey's VFIO patchset. Gavin Shan (3): sPAPR: Implement EEH RTAS calls headers: Update kernel header sPAPR: Implement sPAPRPHBClass::eeh_handler hw/ppc/spapr_pci.c | 248 ++++++++++++++++++++++++++++++++++++++++++++ hw/ppc/spapr_pci_vfio.c | 56 ++++++++++ include/hw/pci-host/spapr.h | 7 ++ include/hw/ppc/spapr.h | 33 ++++++ linux-headers/linux/vfio.h | 34 ++++++ 5 files changed, 378 insertions(+) -- 1.8.3.2