From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH 0/6] introduce DMA memory mapping for external memory Date: Thu, 14 Feb 2019 16:43:09 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Yongseok Koh , Thomas Monjalon , Ferruh Yigit , "nhorman@tuxdriver.com" , Gaetan Rivet , dev To: Shahaf Shuler , Alejandro Lucero Return-path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 78A611B3B6 for ; Thu, 14 Feb 2019 17:43:12 +0100 (CET) In-Reply-To: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 14-Feb-19 1:41 PM, Shahaf Shuler wrote: > Thursday, February 14, 2019 2:22 PM, Alejandro Lucero: > > >Any current NIC or device will work with virtual addresses if IOMMU is > in place, not matter if the device isĀ  IOMMU-aware or not. > > Not sure what you mean here. For example Intel devices works w/ VFIO and > use iova to provide buffers to NIC. hence protection between multiple > process is by application responsibility or new VFIO container. > As far as VFIO is concerned, "multiprocess protection" is not a thing, because the device cannot be used twice in the first place - each usage is strictly limited to one VFIO container. We just sidestep this "limitation" by sharing container/device file descriptors with multiple processes via IPC. So while it's technically true that multiprocess protection is "application responsibility" because we can pass around fd's, it's still protected by the kernel. IOVA mappings are per-container, so the same IOVA range can be mapped twice (thrice...), as long as it's for a different set of devices, in effect making them virtual addresses. -- Thanks, Anatoly