[dpdk-dev] [PATCH v3 46/68] vfio: allow to map other memory regions
Burakov, Anatoly
anatoly.burakov at intel.com
Thu Apr 5 13:30:47 CEST 2018
On 04-Apr-18 12:21 AM, Anatoly Burakov wrote:
> Currently it is not possible to use memory that is not owned by DPDK to
> perform DMA. This scenarion might be used in vhost applications (like
> SPDK) where guest send its own memory table. To fill this gap provide
> API to allow registering arbitrary address in VFIO container.
>
> Signed-off-by: Pawel Wodkowski <pawelx.wodkowski at intel.com>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m at linux.vnet.ibm.com>
> ---
@Gowrishankar,
We've discussed this privately already, but just to make sure it is
publicly stated: as it is, parts of this patchset for PPC64 have
potential issues with them.
Unmapping and remapping the entire segment list on alloc introduces a
race condition - what if a DMA request comes in while we're in the
middle of remapping? We cannot realistically stop NICs from doing DMA
while some other thread is allocating memory.
There is also a larger issue that i've raised in a previous response to
this patch [1], and PPC64 will will have this problem worse, because not
only the described issue will happen on hot-unplug/hotplug, but it may
also happen during regular allocations, because PPC64 IOMMU will drop
all mappings on window resize.
[1] http://dpdk.org/ml/archives/dev/2018-April/095182.html
--
Thanks,
Anatoly
More information about the dev
mailing list