From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFWRo-0002wZ-CS for qemu-devel@nongnu.org; Tue, 12 Mar 2013 17:13:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFWQb-0000yK-Di for qemu-devel@nongnu.org; Tue, 12 Mar 2013 17:09:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFWQb-0000y8-4s for qemu-devel@nongnu.org; Tue, 12 Mar 2013 17:08:09 -0400 Message-ID: <1363122484.24132.113.camel@bling.home> From: Alex Williamson Date: Tue, 12 Mar 2013 15:08:04 -0600 In-Reply-To: <1362815537-27303-1-git-send-email-vijaymohan.pandarathil@hp.com> References: <1362815537-27303-1-git-send-email-vijaymohan.pandarathil@hp.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v7 0/3] AER-KVM: Error containment of VFIO devices assigned to KVM guests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vijay Mohan Pandarathil Cc: gleb@redhat.com, kvm@vger.kernel.org, linux-pci@vger.kernel.org, qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, blauwirbel@gmail.com, bhelgaas@google.com, lance.oritz@hp.com On Sat, 2013-03-09 at 01:52 -0600, Vijay Mohan Pandarathil wrote: > Add support for error containment when a VFIO device assigned to a KVM > guest encounters an error. This is for PCIe devices/drivers that support AER > functionality. When the host OS is notified of an error in a device either > through the firmware first approach or through an interrupt handled by the AER > root port driver, the error handler registered by the vfio-pci driver gets > invoked. The qemu process is signaled through an eventfd registered per > VFIO device by the qemu process. In the eventfd handler, qemu decides on > what action to take. In this implementation, guest is brought down to > contain the error. > > > v7: > - Rebased to latest upstream > - Used device_lock() for synchronising err_trigger access > v6: > - Rebased to latest upstream > - Resolved merge conflict with vfio_dev_present() > v5: > - Rebased to latest upstream stable bits > - Incorporated v4 feedback > v4: > - Stop the guest instead of terminating > - Remove unwanted returns from functions > - Incorporate other feedback > v3: > - Removed PCI_AER* flags from device info ioctl. > - Incorporated feedback > v2: > - Rebased to latest upstream stable bits > - Changed the new ioctl to be part of VFIO_SET_IRQs ioctl > - Added a new patch to get/put reference to a vfio device from struct device > - Incorporated all other feedback. > > --- > > Vijay Mohan Pandarathil(3): > > [PATCH 1/3] VFIO: Wrapper to get reference to vfio_device from device > [PATCH 2/3] VFIO-AER: Vfio-pci driver changes for supporting AER > [PATCH 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices > > Kernel files changed > > drivers/vfio/vfio.c | 30 +++++++++++++++++++++++++++++- > include/linux/vfio.h | 3 +++ > 2 files changed, 32 insertions(+), 1 deletion(-) > > drivers/vfio/pci/vfio_pci.c | 44 ++++++++++++++++++++++++- > drivers/vfio/pci/vfio_pci_intrs.c | 64 +++++++++++++++++++++++++++++++++++++ > drivers/vfio/pci/vfio_pci_private.h | 1 + > include/uapi/linux/vfio.h | 1 + > 4 files changed, 109 insertions(+), 1 deletion(-) Applied 1 & 2 to my next tree, patch 3 is qemu and depends on the vfio.h change getting into mainline so will need to be re-sent once that happens. Thanks, Alex > Qemu files changed > > hw/vfio_pci.c | 123 +++++++++++++++++++++++++++++++++++++++++++++ > linux-headers/linux/vfio.h | 1 + > 2 files changed, 124 insertions(+)