Thread (40 messages) 40 messages, 6 authors, 2021-10-21

Re: [dpdk-dev] [PATCH v5 2/2] vhost: enable IOMMU for async vhost

From: Ding, Xuan <hidden>
Date: 2021-09-28 09:03:27

Hi Anatoly,
-----Original Message-----
From: Burakov, Anatoly <redacted>
Sent: Monday, September 27, 2021 8:14 PM
To: Ding, Xuan <redacted>; dev@dpdk.org;
maxime.coquelin@redhat.com; Xia, Chenbo [off-list ref]
Cc: Hu, Jiayu <redacted>; Jiang, Cheng1 <redacted>;
Richardson, Bruce [off-list ref]; Pai G, Sunil
[off-list ref]; Wang, Yinan [off-list ref]; Yang, YvonneX
[off-list ref]
Subject: Re: [PATCH v5 2/2] vhost: enable IOMMU for async vhost

On 27-Sep-21 8:48 AM, Xuan Ding wrote:
quoted
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 <redacted>
---
quoted
  	/* 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,
quoted
  		goto free_guest_pages;
  	}

+	if (dev->async_copy) {
+		dev->async_map_status = rte_zmalloc_socket("async-dma-
map-status",
quoted
+					sizeof(bool) * memory->nregions, 0,
numa_node);

Would it be useful to sanity check this to make sure we're not leaking
memory?
Thanks for the catch, will add the check in next version.

Regards,
Xuan
--
Thanks,
Anatoly
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help