[dpdk-dev] [PATCH v5 2/2] vhost: enable IOMMU for async vhost
Burakov, Anatoly
anatoly.burakov at intel.com
Mon Sep 27 14:13:46 CEST 2021
On 27-Sep-21 8:48 AM, Xuan Ding wrote:
> The use of IOMMU has many advantages, such as isolation and address
> translation. This patch extends the capbility of DMA engine to use
> IOMMU if the DMA engine is bound to vfio.
>
> When set memory table, the guest memory will be mapped
> into the default container of DPDK.
>
> Signed-off-by: Xuan Ding <xuan.ding at intel.com>
> ---
> /* Flush IOTLB cache as previous HVAs are now invalid */
> @@ -1329,6 +1424,17 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
> goto free_guest_pages;
> }
>
> + if (dev->async_copy) {
> + dev->async_map_status = rte_zmalloc_socket("async-dma-map-status",
> + sizeof(bool) * memory->nregions, 0, numa_node);
Would it be useful to sanity check this to make sure we're not leaking
memory?
--
Thanks,
Anatoly
More information about the dev
mailing list