Hi Anatoly,

> -----Original Message-----
> From: Burakov, Anatoly <anatoly.bura...@intel.com>
> Sent: Monday, September 27, 2021 8:14 PM
> To: Ding, Xuan <xuan.d...@intel.com>; dev@dpdk.org;
> maxime.coque...@redhat.com; Xia, Chenbo <chenbo....@intel.com>
> Cc: Hu, Jiayu <jiayu...@intel.com>; Jiang, Cheng1 <cheng1.ji...@intel.com>;
> Richardson, Bruce <bruce.richard...@intel.com>; Pai G, Sunil
> <sunil.pa...@intel.com>; Wang, Yinan <yinan.w...@intel.com>; Yang, YvonneX
> <yvonnex.y...@intel.com>
> 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 <xuan.d...@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 for the catch, will add the check in next version.

Regards,
Xuan

> 
> --
> Thanks,
> Anatoly

Reply via email to