Hi Anatoly, > -----Original Message----- > From: Burakov, Anatoly <[email protected]> > Sent: Monday, September 27, 2021 8:14 PM > To: Ding, Xuan <[email protected]>; [email protected]; > [email protected]; Xia, Chenbo <[email protected]> > Cc: Hu, Jiayu <[email protected]>; Jiang, Cheng1 <[email protected]>; > Richardson, Bruce <[email protected]>; Pai G, Sunil > <[email protected]>; Wang, Yinan <[email protected]>; Yang, YvonneX > <[email protected]> > Subject: Re: [PATCH v5 2/2] vhost: enable IOMMU for async vhost > > 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 <[email protected]> > > --- > > > > /* 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 for the catch, will add the check in next version. Regards, Xuan > > -- > Thanks, > Anatoly

