Re: [PATCH v9 0/7] IOMMU user API enhancement

From: Jacob Pan
Date: Fri Sep 18 2020 - 13:24:33 EST


Hi Joerg,

On Fri, 18 Sep 2020 12:02:36 +0200, Joerg Roedel <joro@xxxxxxxxxx> wrote:

> Hi Jacob,
>
> On Fri, Sep 11, 2020 at 02:57:49PM -0700, Jacob Pan wrote:
> > IOMMU user API header was introduced to support nested DMA translation
> > and related fault handling. The current UAPI data structures consist of
> > three areas that cover the interactions between host kernel and guest:
> > - fault handling
> > - cache invalidation
> > - bind guest page tables, i.e. guest PASID
> >
> > Future extensions are likely to support more architectures and vIOMMU
> > features.
> >
> > In the previous discussion, using user-filled data size and feature
> > flags is made a preferred approach over a unified version number.
> > https://lkml.org/lkml/2020/1/29/45
> >
> > In addition to introduce argsz field to data structures, this patchset
> > is also trying to document the UAPI design, usage, and extension rules.
> > VT-d driver changes to utilize the new argsz field is included, VFIO
> > usage is to follow.
> >
> > This set is available at:
> > https://github.com/jacobpan/linux.git vsva_v5.9_uapi_v9
>
> This changes user visible structs in incompatible ways, are you sure
> those are not used yet anywhere?
>
These structs are not used yet in that IOMMU UAPI does not provide
direct user IOCTLs. For guest SVA of assigned devices, VFIO is used. Yi's
companion patches are here.
https://lore.kernel.org/linux-iommu/5dd95fbf-054c-3bbc-e76b-2d5636214ff2@xxxxxxxxxx/T/#t

These user structs can also be used by other framework in the future, such
as vDPA.

> Please address Randy's comments on patch 1 and my comment about the
> build-time checking and repost with linux-api@xxxxxxxxxxxxxxx on Cc.
>
Will do.

> Regards,
>
> Joerg


Thanks,

Jacob