From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Subject: Re: [PATCH v2 13/40] vfio: Add support for Shared Virtual Addressing To: Xu Zaibo , "linux-arm-kernel@lists.infradead.org" , "linux-pci@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "devicetree@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" , "linux-mm@kvack.org" References: <20180511190641.23008-1-jean-philippe.brucker@arm.com> <20180511190641.23008-14-jean-philippe.brucker@arm.com> <5B83B11E.7010807@huawei.com> <1d5b6529-4e5a-723c-3f1b-dd5a9adb490c@arm.com> <5B89F818.7060300@huawei.com> <3a961aff-e830-64bb-b6a9-14e08de1abf5@arm.com> <5B8DEA15.7020404@huawei.com> From: Jean-Philippe Brucker Message-ID: Date: Tue, 4 Sep 2018 11:57:02 +0100 MIME-Version: 1.0 In-Reply-To: <5B8DEA15.7020404@huawei.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "xieyisheng1@huawei.com" , "liubo95@huawei.com" , "thunder.leizhen@huawei.com" , Will Deacon , "okaya@codeaurora.org" , "liguozhu@hisilicon.com" , fanghao11 , "yi.l.liu@intel.com" , "ashok.raj@intel.com" , "tn@semihalf.com" , "joro@8bytes.org" , wangzhou1 , "bharatku@xilinx.com" , "liudongdong3@huawei.com" , "rfranz@cavium.com" , "kevin.tian@intel.com" , "jacob.jun.pan@linux.intel.com" , "jcrouse@codeaurora.org" , "rgummal@xilinx.com" , "jonathan.cameron@huawei.com" , =?UTF-8?B?57Gz57Gz?= , "shunyong.yang@hxt-semitech.com" , "dwmw2@infradead.org" , "ilias.apalodimas@linaro.org" , "alex.williamson@redhat.com" , "robdclark@gmail.com" , Robin Murphy , "christian.koenig@amd.com" , "nwatters@codeaurora.org" , "baolu.lu@linux.intel.com" Content-Type: text/plain; charset="us-ascii" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+bjorn=helgaas.com@lists.infradead.org List-ID: On 04/09/2018 03:12, Xu Zaibo wrote: > On 2018/9/3 18:34, Jean-Philippe Brucker wrote: >> On 01/09/18 03:23, Xu Zaibo wrote: >>> As one application takes a whole function while using VFIO-PCI, why do >>> the application and the >>> function need to enable PASID capability? (Since just one I/O page table >>> is enough for them.) >> At the moment the series doesn't provide support for SVA without PASID >> (on the I/O page fault path, 08/40). In addition the BIND ioctl could be >> used by the owner application to bind other processes (slaves) and >> perform sub-assignment. But that feature is incomplete because we don't >> send stop_pasid notification to the owner when a slave dies. >> > So, Could I understand like this? > > 1. While the series are finished well, VFIO-PCI device can be held > by only one process > through binding IOCTL command without PASID (without PASID > being exposed user space). It could, but isn't supported at the moment. In addition to adding support in the I/O page fault code, we'd also need to update the VFIO API. Currently a VFIO_TYPE1 domain always supports the MAP/UNMAP ioctl. The case you describe isn't compatible with MAP/UNMAP, since the process manages the shared address space with mmap or malloc. We'd probably need to introduce a new VFIO IOMMU type, in which case the bind could be performed implicitly when the process does VFIO_SET_IOMMU. Then the process wouldn't need to send an additional BIND IOCTL. > 2. While using VFIO-PCI device to support multiple processes with > SVA series, a primary > process with multiple secondary processes must be deployed just > like DPDK(https://www.dpdk.org/). > And, the PASID still has to be exposed to user land. Right. A third case, also implemented by this patch (and complete), is the primary process simply doing a BIND for itself, and using the returned PASID to share its own address space with the device. Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel