[AMD Official Use Only - General]

Hi David,

I agree that change is not straightforward to review, but it should not cause 
any functional issue as we are still creating all the memory mappings, but one 
by one for each segment.
For hot plug case this causes issue as mentioned, that VFIO does not allow 
unmap of the individual segments in case mapping was created of a single 
coalesced segment. 

But yes, I am not sure why this code was added, which Anatoly may have more 
understanding on.

Anatoly,

Can you please provide your feedback on this change?

Thanks,
Nipun

> -----Original Message-----
> From: David Marchand <david.march...@redhat.com>
> Sent: Thursday, February 2, 2023 4:19 PM
> To: anatoly.bura...@intel.com; Gupta, Nipun <nipun.gu...@amd.com>
> Cc: dev@dpdk.org; tho...@monjalon.net; Yigit, Ferruh
> <ferruh.yi...@amd.com>; Agarwal, Nikhil <nikhil.agar...@amd.com>
> Subject: Re: [PATCH v2] vfio: do not coalesce DMA mappings
> 
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
> 
> 
> Hi,
> 
> On Wed, Jan 4, 2023 at 6:19 AM Nipun Gupta <nipun.gu...@amd.com> wrote:
> >
> > At the cleanup time when dma unmap is done, linux kernel
> > does not allow unmap of individual segments which were
> > coalesced together while creating the DMA map for type1 IOMMU
> > mappings. So, this change updates the mapping of the memory
> > segments(hugepages) on a per-page basis.
> >
> > Signed-off-by: Nipun Gupta <nipun.gu...@amd.com>
> > Signed-off-by: Nikhil Agarwal <nikhil.agar...@amd.com>
> 
> This change is scary.
> 
> I won't take it without a review from the maintainer.
> Anatoly, can you have a look?
> 
> 
> Thanks.
> --
> David Marchand

Reply via email to