From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beYle-0003ZI-5Z for qemu-devel@nongnu.org; Mon, 29 Aug 2016 22:27:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beYla-0006Kb-2c for qemu-devel@nongnu.org; Mon, 29 Aug 2016 22:27:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beYlZ-0006KE-U1 for qemu-devel@nongnu.org; Mon, 29 Aug 2016 22:27:10 -0400 Date: Tue, 30 Aug 2016 05:27:07 +0300 From: "Michael S. Tsirkin" Message-ID: <1472523968-9540-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH v2 0/2] vfio: blacklist legacy virtio devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: linux-kernel@vger.kernel.org Cc: Jason Wang , Alex Williamson , Cornelia Huck , virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org, kvm@vger.kernel.org Legacy virtio devices always bypassed an IOMMU, so using them with vfio was never safe. This adds a quirk detecting these and disabling VFIO unless the noiommu mode is used. At the moment, this only applies to virtio-pci devices. The patch might make sense on stable as well. Michael S. Tsirkin (2): vfio: report group noiommu status vfio: add virtio pci quirk drivers/vfio/pci/vfio_pci_private.h | 1 + include/linux/vfio.h | 2 + drivers/vfio/pci/vfio_pci.c | 14 ++++ drivers/vfio/pci/vfio_pci_virtio.c | 140 ++++++++++++++++++++++++++++++++++++ drivers/vfio/vfio.c | 12 ++++ drivers/vfio/pci/Makefile | 1 + 6 files changed, 170 insertions(+) create mode 100644 drivers/vfio/pci/vfio_pci_virtio.c -- MST