From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceF6f-0002TW-Sp for qemu-devel@nongnu.org; Thu, 16 Feb 2017 00:59:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceF6c-0002Yq-NA for qemu-devel@nongnu.org; Thu, 16 Feb 2017 00:59:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45190) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ceF6c-0002YQ-E8 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 00:59:50 -0500 References: <1484026704-28027-1-git-send-email-mst@redhat.com> <1484026704-28027-9-git-send-email-mst@redhat.com> From: Jason Wang Message-ID: <00b66a54-57d0-d85a-8358-e84f927f2904@redhat.com> Date: Thu, 16 Feb 2017 13:59:41 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL 08/41] intel_iommu: support device iotlb descriptor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Liu, Yi L" , "Michael S. Tsirkin" , "qemu-devel@nongnu.org" Cc: "Lan, Tianyu" , Peter Maydell , "Tian, Kevin" , Eduardo Habkost , Peter Xu , Alex Williamson , Paolo Bonzini , Richard Henderson On 2017=E5=B9=B402=E6=9C=8816=E6=97=A5 13:43, Jason Wang wrote: > > > On 2017=E5=B9=B402=E6=9C=8816=E6=97=A5 13:36, Liu, Yi L wrote: >>> -----Original Message----- >>> From: Qemu-devel=20 >>> [mailto:qemu-devel-bounces+yi.l.liu=3Dintel.com@nongnu.org] >>> On Behalf Of Michael S. Tsirkin >>> Sent: Tuesday, January 10, 2017 1:40 PM >>> To: qemu-devel@nongnu.org >>> Cc: Peter Maydell ; Eduardo Habkost >>> ; Jason Wang ; Peter Xu >>> ; Paolo Bonzini ; Richard >>> Henderson >>> Subject: [Qemu-devel] [PULL 08/41] intel_iommu: support device iotlb >>> descriptor >>> >>> From: Jason Wang >>> >>> This patch enables device IOTLB support for intel iommu. The major=20 >>> work is to >>> implement QI device IOTLB descriptor processing and notify the=20 >>> device through >>> iommu notifier. >>> >> Hi Jason/Michael, >> >> Recently Peter Xu's patch also touched intel-iommu emulation. His=20 >> patch shadows >> second-level page table by capturing iotlb flush from guest. It would=20 >> result in page >> table updating in host. Does this patch also use the same map/umap=20 >> API provided >> by VFIO? > > Yes, it depends on the iommu notifier too. > >> If it is, then I think it would also update page table in host. It=20 >> looks to be >> a duplicate update. Pls refer to the following snapshot captured from=20 >> section 6.5.2.5 >> of vtd spec. >> >> "Since translation requests from a device may be serviced by hardware=20 >> from the IOTLB, software must >> always request IOTLB invalidation (iotlb_inv_dsc) before requesting=20 >> corresponding Device-TLB >> (dev_tlb_inv_dsc) invalidation." >> >> Maybe for device-iotlb, we need a separate API which just pass down=20 >> the invalidate >> info without updating page table. Any thoughts? > > cc Alex. > > If we want ATS to be visible for guest (but I'm not sure if VFIO=20 > support this), we probably need another notifier or a new flag. > > Thanks=20 Or need a dedicated address_space if ATS were enabled for the device.