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.wodkow...@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com>
Signed-off-by: Gowrishankar Muthukrishnan <gowrishanka...@linux.vnet.ibm.com>
---
There's a larger issue raised by this patch. We do support hotplug for
VFIO devices, and VFIO will drop all maps whenever last device used by
VFIO is unplugged. Since primary use case for this API is mapping
non-DPDK-owned memory for DMA, this presents a problem, because we're
not tracking the mapped areas anywhere, which means that on last device
hot-unplug followed by first device hotplug event, whatever DMA maps
user has set up, will be gone - only DPDK-owned memory will be remapped.
One way we could solve it is to store user maps in a local tailq and
remap those on hotplug. Another way would be to not solve it and just
document this limitation - that using this API in conjunction with
hotplug will result in undefined behavior. I would tend to favor the
first way.
--
Thanks,
Anatoly