RE: [PATCH v5 11/19] iommufd: IOCTLs for the io_pagetable

Tian, Kevin
2022-11-28T09:05:54Z

> From: Eric Auger <eric.auger@redhat.com>
> Sent: Monday, November 28, 2022 1:49 AM
> > +struct iommu_ioas_copy {
> > + __u32 size;
> > + __u32 flags;
> > + __u32 dst_ioas_id;
> > + __u32 src_ioas_id;
> is src_ioas_id == dst_ioas_id allowed?

I suppose so. iommufd_ioas_copy() simply gets a reference to
underlying iopt_pages according to [src_ioas_id, src_iova] and
then map it into [dst_ioas_id, dst_iova]. It doesn’t matter
whether iopt_pages comes from a same or different ioas.

The only restriction is that the src/dst ranges don't overlap.