RE: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-15 Thread Tian, Kevin
> From: Jacob Pan > Sent: Wednesday, April 15, 2020 11:39 PM > > On Tue, 14 Apr 2020 23:47:40 + > "Tian, Kevin" wrote: > > > > From: Jacob Pan > > > Sent: Wednesday, April 15, 2020 6:32 AM > > > > > > On Tue, 14 Apr 2020 10:13:04 -0700 > > > Jacob Pan wrote: > > > > > > > > > > In any

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-15 Thread Jacob Pan
On Tue, 14 Apr 2020 23:47:40 + "Tian, Kevin" wrote: > > From: Jacob Pan > > Sent: Wednesday, April 15, 2020 6:32 AM > > > > On Tue, 14 Apr 2020 10:13:04 -0700 > > Jacob Pan wrote: > > > > > > > > In any of the proposed solutions, the > > > > > > IOMMU driver is ultimately responsible

RE: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-14 Thread Tian, Kevin
> From: Jacob Pan > Sent: Wednesday, April 15, 2020 6:32 AM > > On Tue, 14 Apr 2020 10:13:04 -0700 > Jacob Pan wrote: > > > > > > In any of the proposed solutions, the > > > > > IOMMU driver is ultimately responsible for validating the user > > > > > data, so do we want vfio performing the

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-14 Thread Jacob Pan
On Tue, 14 Apr 2020 10:13:04 -0700 Jacob Pan wrote: > > > > In any of the proposed solutions, the > > > > IOMMU driver is ultimately responsible for validating the user > > > > data, so do we want vfio performing the copy_from_user() to an > > > > object that could later be assumed to be

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-14 Thread Jacob Pan
On Tue, 14 Apr 2020 10:13:58 -0600 Alex Williamson wrote: > On Mon, 13 Apr 2020 22:05:15 -0700 > Jacob Pan wrote: > > > Hi Alex, > > Thanks a lot for the feedback, my comments inline. > > > > On Mon, 13 Apr 2020 16:21:29 -0600 > > Alex Williamson wrote: > > > > > On Mon, 13 Apr 2020

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-14 Thread Alex Williamson
On Mon, 13 Apr 2020 22:05:15 -0700 Jacob Pan wrote: > Hi Alex, > Thanks a lot for the feedback, my comments inline. > > On Mon, 13 Apr 2020 16:21:29 -0600 > Alex Williamson wrote: > > > On Mon, 13 Apr 2020 13:41:57 -0700 > > Jacob Pan wrote: > > > > > Hi All, > > > > > > Just a gentle

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-14 Thread Jacob Pan
On Tue, 14 Apr 2020 01:11:07 -0700 Christoph Hellwig wrote: > On Mon, Apr 13, 2020 at 01:41:57PM -0700, Jacob Pan wrote: > > Hi All, > > > > Just a gentle reminder, any feedback on the options I listed below? > > New ideas will be even better. > > > > Christoph, does the explanation make sense

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-14 Thread Christoph Hellwig
On Mon, Apr 13, 2020 at 04:21:29PM -0600, Alex Williamson wrote: > Is the objection to a global version or to any version fields? I don't > really understand the global version, I'd think a mechanism to check > extensions plus a per structure flags/version would be preferred. The > former should

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-14 Thread Christoph Hellwig
On Mon, Apr 13, 2020 at 01:41:57PM -0700, Jacob Pan wrote: > Hi All, > > Just a gentle reminder, any feedback on the options I listed below? New > ideas will be even better. > > Christoph, does the explanation make sense to you? We do have the > capability/flag based scheme for IOMMU API

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-13 Thread Jacob Pan
Hi Alex, Thanks a lot for the feedback, my comments inline. On Mon, 13 Apr 2020 16:21:29 -0600 Alex Williamson wrote: > On Mon, 13 Apr 2020 13:41:57 -0700 > Jacob Pan wrote: > > > Hi All, > > > > Just a gentle reminder, any feedback on the options I listed below? > > New ideas will be even

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-13 Thread Alex Williamson
On Mon, 13 Apr 2020 13:41:57 -0700 Jacob Pan wrote: > Hi All, > > Just a gentle reminder, any feedback on the options I listed below? New > ideas will be even better. > > Christoph, does the explanation make sense to you? We do have the > capability/flag based scheme for IOMMU API extension,

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-13 Thread Jacob Pan
Hi All, Just a gentle reminder, any feedback on the options I listed below? New ideas will be even better. Christoph, does the explanation make sense to you? We do have the capability/flag based scheme for IOMMU API extension, the version is mainly used for size lookup. Compatibility checking is

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-04-02 Thread Jacob Pan
On Wed, 1 Apr 2020 05:32:21 + "Tian, Kevin" wrote: > > From: Jacob Pan > > Sent: Tuesday, March 31, 2020 11:55 PM > > > > On Tue, 31 Mar 2020 06:06:38 + > > "Tian, Kevin" wrote: > > > > > > From: Jacob Pan > > > > Sent: Tuesday, March 31, 2020 12:08 AM > > > > > > > > On Mon, 30

RE: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-03-31 Thread Tian, Kevin
> From: Jacob Pan > Sent: Tuesday, March 31, 2020 11:55 PM > > On Tue, 31 Mar 2020 06:06:38 + > "Tian, Kevin" wrote: > > > > From: Jacob Pan > > > Sent: Tuesday, March 31, 2020 12:08 AM > > > > > > On Mon, 30 Mar 2020 05:40:40 + > > > "Tian, Kevin" wrote: > > > > > > > > From: Jacob

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-03-31 Thread Jacob Pan
On Tue, 31 Mar 2020 06:06:38 + "Tian, Kevin" wrote: > > From: Jacob Pan > > Sent: Tuesday, March 31, 2020 12:08 AM > > > > On Mon, 30 Mar 2020 05:40:40 + > > "Tian, Kevin" wrote: > > > > > > From: Jacob Pan > > > > Sent: Saturday, March 28, 2020 7:54 AM > > > > > > > > On Fri, 27

RE: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-03-31 Thread Tian, Kevin
> From: Jacob Pan > Sent: Tuesday, March 31, 2020 12:08 AM > > On Mon, 30 Mar 2020 05:40:40 + > "Tian, Kevin" wrote: > > > > From: Jacob Pan > > > Sent: Saturday, March 28, 2020 7:54 AM > > > > > > On Fri, 27 Mar 2020 00:47:02 -0700 > > > Christoph Hellwig wrote: > > > > > > > On Fri,

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-03-30 Thread Jacob Pan
On Mon, 30 Mar 2020 05:40:40 + "Tian, Kevin" wrote: > > From: Jacob Pan > > Sent: Saturday, March 28, 2020 7:54 AM > > > > On Fri, 27 Mar 2020 00:47:02 -0700 > > Christoph Hellwig wrote: > > > > > On Fri, Mar 27, 2020 at 02:49:55AM +, Tian, Kevin wrote: > > > > If those API calls

RE: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-03-29 Thread Tian, Kevin
> From: Jacob Pan > Sent: Saturday, March 28, 2020 7:54 AM > > On Fri, 27 Mar 2020 00:47:02 -0700 > Christoph Hellwig wrote: > > > On Fri, Mar 27, 2020 at 02:49:55AM +, Tian, Kevin wrote: > > > If those API calls are inter-dependent for composing a feature > > > (e.g. SVA), shouldn't we

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-03-27 Thread Jacob Pan
On Fri, 27 Mar 2020 00:47:02 -0700 Christoph Hellwig wrote: > On Fri, Mar 27, 2020 at 02:49:55AM +, Tian, Kevin wrote: > > If those API calls are inter-dependent for composing a feature > > (e.g. SVA), shouldn't we need a way to check them together before > > exposing the feature to the

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-03-27 Thread Christoph Hellwig
On Fri, Mar 27, 2020 at 02:49:55AM +, Tian, Kevin wrote: > If those API calls are inter-dependent for composing a feature (e.g. SVA), > shouldn't we need a way to check them together before exposing the > feature to the guest, e.g. through a iommu_get_uapi_capabilities interface? Yes, that

RE: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-03-26 Thread Tian, Kevin
> From: Jacob Pan > Sent: Friday, March 27, 2020 12:45 AM > > Hi Christoph, > > Thanks for the review. Please see my comments inline. > > On Thu, 26 Mar 2020 02:23:16 -0700 > Christoph Hellwig wrote: > > > On Wed, Mar 25, 2020 at 04:17:05PM -0700, Jacob Pan wrote: > > > Having a single UAPI

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-03-26 Thread Jacob Pan
Hi Christoph, Thanks for the review. Please see my comments inline. On Thu, 26 Mar 2020 02:23:16 -0700 Christoph Hellwig wrote: > On Wed, Mar 25, 2020 at 04:17:05PM -0700, Jacob Pan wrote: > > Having a single UAPI version to govern the user-kernel data > > structures makes compatibility check

Re: [PATCH v2 1/3] iommu/uapi: Define uapi version and capabilities

2020-03-26 Thread Christoph Hellwig
On Wed, Mar 25, 2020 at 04:17:05PM -0700, Jacob Pan wrote: > Having a single UAPI version to govern the user-kernel data structures > makes compatibility check straightforward. On the contrary, supporting > combinations of multiple versions of the data can be a nightmare to > maintain. > > This