From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757102AbcH3DQd (ORCPT ); Mon, 29 Aug 2016 23:16:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48402 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756246AbcH3DQc (ORCPT ); Mon, 29 Aug 2016 23:16:32 -0400 Subject: Re: [Qemu-devel] [PATCH v2 0/2] vfio: blacklist legacy virtio devices To: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org References: <1472523968-9540-1-git-send-email-mst@redhat.com> Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, Alex Williamson , Cornelia Huck From: Jason Wang Message-ID: Date: Tue, 30 Aug 2016 11:16:25 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1472523968-9540-1-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 30 Aug 2016 03:16:31 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016年08月30日 10:27, Michael S. Tsirkin wrote: > Legacy virtio devices always bypassed an IOMMU, so using them with vfio was > never safe. And it actually won't work since GPA is assumed in the device. So I'm not sure this is must since we should get a IOMMU fault in this case. > 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 >