Re: [PATCH v4 1/5] docs: IOMMU user API

2020-07-15 Thread Jacob Pan
On Tue, 14 Jul 2020 13:04:12 -0600 Alex Williamson wrote: > > > The > > > mangling of the user provided argsz above makes me cringe a > > > little too for that reason, once we start modifying the user > > > values in the core it could get messy for the vendor drivers. > > > > > We do have

Re: [PATCH v4 1/5] docs: IOMMU user API

2020-07-14 Thread Jacob Pan
On Tue, 14 Jul 2020 13:04:12 -0600 Alex Williamson wrote: > On Mon, 13 Jul 2020 22:00:23 -0700 > Jacob Pan wrote: > > > Hi Alex, > > > > On Mon, 13 Jul 2020 16:48:42 -0600 > > Alex Williamson wrote: > > > > > On Tue, 7 Jul 2020 16:43:45 -0700 > > > Jacob Pan wrote: > > > > > > >

Re: [PATCH v4 1/5] docs: IOMMU user API

2020-07-14 Thread Alex Williamson
On Mon, 13 Jul 2020 22:00:23 -0700 Jacob Pan wrote: > Hi Alex, > > On Mon, 13 Jul 2020 16:48:42 -0600 > Alex Williamson wrote: > > > On Tue, 7 Jul 2020 16:43:45 -0700 > > Jacob Pan wrote: > > > > > IOMMU UAPI is newly introduced to support communications between > > > guest virtual IOMMU

Re: [PATCH v4 1/5] docs: IOMMU user API

2020-07-13 Thread Jacob Pan
Hi Alex, On Mon, 13 Jul 2020 16:48:42 -0600 Alex Williamson wrote: > On Tue, 7 Jul 2020 16:43:45 -0700 > Jacob Pan wrote: > > > IOMMU UAPI is newly introduced to support communications between > > guest virtual IOMMU and host IOMMU. There has been lots of > > discussions on how it should

Re: [PATCH v4 1/5] docs: IOMMU user API

2020-07-13 Thread Alex Williamson
On Tue, 7 Jul 2020 16:43:45 -0700 Jacob Pan wrote: > IOMMU UAPI is newly introduced to support communications between guest > virtual IOMMU and host IOMMU. There has been lots of discussions on how > it should work with VFIO UAPI and userspace in general. > > This document is indended to

Re: [PATCH v4 1/5] docs: IOMMU user API

2020-07-08 Thread Lu Baolu
Hi Jacob, On 7/8/20 11:29 PM, Jacob Pan wrote: On Wed, 8 Jul 2020 10:07:13 +0800 Lu Baolu wrote: Hi, On 7/8/20 7:43 AM, Jacob Pan wrote: +For UAPIs that are shared with in-kernel users, a wrapper function +is provided to distinguish the callers. For example, + +Userspace caller :: + + int

Re: [PATCH v4 1/5] docs: IOMMU user API

2020-07-08 Thread Jacob Pan
On Wed, 8 Jul 2020 10:07:13 +0800 Lu Baolu wrote: > Hi, > > On 7/8/20 7:43 AM, Jacob Pan wrote: > > +For UAPIs that are shared with in-kernel users, a wrapper function > > +is provided to distinguish the callers. For example, > > + > > +Userspace caller :: > > + > > + int

Re: [PATCH v4 1/5] docs: IOMMU user API

2020-07-07 Thread Lu Baolu
Hi, On 7/8/20 7:43 AM, Jacob Pan wrote: +For UAPIs that are shared with in-kernel users, a wrapper function +is provided to distinguish the callers. For example, + +Userspace caller :: + + int iommu_sva_unbind_gpasid(struct iommu_domain *domain, struct device *dev, + void __user *udata) +

[PATCH v4 1/5] docs: IOMMU user API

2020-07-07 Thread Jacob Pan
IOMMU UAPI is newly introduced to support communications between guest virtual IOMMU and host IOMMU. There has been lots of discussions on how it should work with VFIO UAPI and userspace in general. This document is indended to clarify the UAPI design and usage. The mechenics of how future