From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb0Uk-0001M3-PO for qemu-devel@nongnu.org; Thu, 26 Mar 2015 01:38:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yb0UY-0000qD-0p for qemu-devel@nongnu.org; Thu, 26 Mar 2015 01:38:18 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:60018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb0UX-0000pa-Ac for qemu-devel@nongnu.org; Thu, 26 Mar 2015 01:38:05 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Mar 2015 15:38:01 +1000 From: Gavin Shan Date: Thu, 26 Mar 2015 16:35:00 +1100 Message-Id: <1427348102-5879-1-git-send-email-gwshan@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v3 0/2] Bug fixes for EEH on VFIO PCI devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: agraf@suse.de, Gavin Shan , alex.williamson@redhat.com, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au The patches are fixing 2 issues for EEH on VFIO PCI devices. PATCH[1/2] clears stale MSIx table of VFIO PCI devices when asserting fundamental or hot PE reset so that their MSIx tables can be restored properly after reset to avoid recursive EEH error. PATCH[2/2] clears PE frozen state in case the guest hits excessive EEH errors. With the fix, the VFIO PCI devices are expected to work again after rebooting guest. Changelog ========= v2 -> v3: * Introduced vfio_eeh_pe_reset(), which is called from spapr_pci_vfio.c when asserting PE reset, replaces vfio_container_eeh_event() to clear stale MSIx tables. * Droped the patch "VFIO: Disable INTx interrupt on EEH reset", which is caused by KVM bugs on host side. v1 -> v2: * vfio_container_eeh_event() stub for !CONFIG_PCI and separate error message for this function. Dropped vfio_put_group() on NULL group * Disabling INTx interrupt, instead of clearing INTx pending flag during PE reset. Gavin Shan (2): VFIO: Clear stale MSIx table during EEH reset sPAPR: Reenable EEH functionality on reboot hw/ppc/spapr_pci_vfio.c | 27 ++++++++++++++++++++++----- hw/vfio/Makefile.objs | 6 +++++- hw/vfio/pci-stub.c | 16 ++++++++++++++++ hw/vfio/pci.c | 36 ++++++++++++++++++++++++++++++++++++ include/hw/vfio/vfio.h | 2 ++ 5 files changed, 81 insertions(+), 6 deletions(-) create mode 100644 hw/vfio/pci-stub.c -- 1.8.3.2