RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-07-22 Thread Tian, Kevin
> From: Christoph Hellwig > Sent: Friday, July 23, 2021 1:41 PM > > On Fri, Jul 23, 2021 at 05:36:17AM +, Tian, Kevin wrote: > > > > And a new set of IOMMU-API: > > > > > > > > - iommu_{un}bind_pgtable(domain, dev, addr); > > > > - iommu_{un}bind_pgtable_pasid(domain, dev, addr, pasid

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-07-22 Thread Christoph Hellwig
On Fri, Jul 23, 2021 at 05:36:17AM +, Tian, Kevin wrote: > > > And a new set of IOMMU-API: > > > > > > - iommu_{un}bind_pgtable(domain, dev, addr); > > > - iommu_{un}bind_pgtable_pasid(domain, dev, addr, pasid); > > > - iommu_cache_invalidate(domain, dev, invalid_info); > > > > Wha

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-07-22 Thread Tian, Kevin
> From: Christoph Hellwig > Sent: Thursday, July 22, 2021 9:35 PM > > On Wed, Jun 30, 2021 at 09:08:19AM +, Tian, Kevin wrote: > > The iommu layer should maintain above attaching status per device and > per > > iommu domain. There is no mdev/subdev concept in the iommu layer. It's > > just ab

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-07-22 Thread Christoph Hellwig
On Wed, Jun 30, 2021 at 09:08:19AM +, Tian, Kevin wrote: > The iommu layer should maintain above attaching status per device and per > iommu domain. There is no mdev/subdev concept in the iommu layer. It's > just about RID or PASID. Yes, I think that makes sense. > And a new set of IOMMU-API:

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-07-21 Thread Tian, Kevin
A gentle ping... > From: Tian, Kevin > Sent: Wednesday, June 30, 2021 5:08 PM > > > From: Joerg Roedel > > Sent: Monday, May 17, 2021 11:35 PM > > > > On Mon, May 17, 2021 at 10:35:00AM -0300, Jason Gunthorpe wrote: > > > Well, I'm sorry, but there is a huge other thread talking about the > > >

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-06-30 Thread Tian, Kevin
> From: Joerg Roedel > Sent: Monday, May 17, 2021 11:35 PM > > On Mon, May 17, 2021 at 10:35:00AM -0300, Jason Gunthorpe wrote: > > Well, I'm sorry, but there is a huge other thread talking about the > > IOASID design in great detail and why this is all needed. Jumping into > > this thread withou

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-24 Thread Jason Gunthorpe
On Mon, May 24, 2021 at 07:18:33PM +0100, Robin Murphy wrote: > On 2021-05-20 15:34, Jason Gunthorpe wrote: > > On Thu, May 20, 2021 at 03:13:55PM +0100, Robin Murphy wrote: > > > > > By "mdev-like" I mean it's very similar in shape to the general SIOV-style > > > mediated device concept - i.e. a

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-24 Thread Robin Murphy
On 2021-05-20 15:34, Jason Gunthorpe wrote: On Thu, May 20, 2021 at 03:13:55PM +0100, Robin Murphy wrote: By "mdev-like" I mean it's very similar in shape to the general SIOV-style mediated device concept - i.e. a physical device with an awareness of operating on multiple contexts at once, usin

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-20 Thread Jason Gunthorpe
On Thu, May 20, 2021 at 03:13:55PM +0100, Robin Murphy wrote: > By "mdev-like" I mean it's very similar in shape to the general SIOV-style > mediated device concept - i.e. a physical device with an awareness of > operating on multiple contexts at once, using a Substream ID/PASID for each > one - b

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-20 Thread Robin Murphy
On 2021-05-20 00:24, Jason Gunthorpe wrote: On Wed, May 19, 2021 at 11:12:46PM +, Tian, Kevin wrote: From: Jason Gunthorpe Sent: Thursday, May 20, 2021 2:07 AM On Wed, May 19, 2021 at 04:23:21PM +0100, Robin Murphy wrote: On 2021-05-17 16:35, Joerg Roedel wrote: On Mon, May 17, 2021 at 1

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-19 Thread Jason Gunthorpe
On Wed, May 19, 2021 at 11:12:46PM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Thursday, May 20, 2021 2:07 AM > > > > On Wed, May 19, 2021 at 04:23:21PM +0100, Robin Murphy wrote: > > > On 2021-05-17 16:35, Joerg Roedel wrote: > > > > On Mon, May 17, 2021 at 10:35:00AM -0300, Ja

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-19 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, May 20, 2021 2:07 AM > > On Wed, May 19, 2021 at 04:23:21PM +0100, Robin Murphy wrote: > > On 2021-05-17 16:35, Joerg Roedel wrote: > > > On Mon, May 17, 2021 at 10:35:00AM -0300, Jason Gunthorpe wrote: > > > > Well, I'm sorry, but there is a huge other t

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-19 Thread Jason Gunthorpe
On Wed, May 19, 2021 at 04:23:21PM +0100, Robin Murphy wrote: > On 2021-05-17 16:35, Joerg Roedel wrote: > > On Mon, May 17, 2021 at 10:35:00AM -0300, Jason Gunthorpe wrote: > > > Well, I'm sorry, but there is a huge other thread talking about the > > > IOASID design in great detail and why this is

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-19 Thread Robin Murphy
On 2021-05-17 16:35, Joerg Roedel wrote: On Mon, May 17, 2021 at 10:35:00AM -0300, Jason Gunthorpe wrote: Well, I'm sorry, but there is a huge other thread talking about the IOASID design in great detail and why this is all needed. Jumping into this thread without context and basically rejecting

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-17 Thread Joerg Roedel
On Mon, May 17, 2021 at 10:35:00AM -0300, Jason Gunthorpe wrote: > Well, I'm sorry, but there is a huge other thread talking about the > IOASID design in great detail and why this is all needed. Jumping into > this thread without context and basically rejecting all the > conclusions that were reach

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-17 Thread Jason Gunthorpe
On Mon, May 17, 2021 at 02:53:16PM +0200, Joerg Roedel wrote: > On Mon, May 17, 2021 at 09:30:10AM -0300, Jason Gunthorpe wrote: > > On Mon, May 17, 2021 at 02:22:06PM +0200, Joerg Roedel wrote: > > > Yes, I know, We have the AUX-domain specific functions now, but I > > > suggested a while back to

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-17 Thread Joerg Roedel
On Mon, May 17, 2021 at 09:30:10AM -0300, Jason Gunthorpe wrote: > On Mon, May 17, 2021 at 02:22:06PM +0200, Joerg Roedel wrote: > > Yes, I know, We have the AUX-domain specific functions now, but I > > suggested a while back to turn the mdev code into its own bus > > implementation and let the IOM

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-17 Thread Jason Gunthorpe
On Mon, May 17, 2021 at 02:22:06PM +0200, Joerg Roedel wrote: > On Fri, May 14, 2021 at 10:31:43AM -0300, Jason Gunthorpe wrote: > > There is no place for "domain as a carrier of PASID" > > there. mdev_device should NOT participate in the IOMMU layer because > > it is NOT a HW device. Trying to war

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-17 Thread Joerg Roedel
On Fri, May 14, 2021 at 10:31:43AM -0300, Jason Gunthorpe wrote: > There is no place for "domain as a carrier of PASID" > there. mdev_device should NOT participate in the IOMMU layer because > it is NOT a HW device. Trying to warp mdev_device into an IOMMU > presence is already the source of a lot

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-14 Thread Jason Gunthorpe
On Fri, May 14, 2021 at 02:28:44PM +, Tian, Kevin wrote: > Well, I see what you meant now. Basically you want to make IOASID > as the first-class object in the entire iommu stack, replacing what > iommu domain fulfill todays. Alternatively you transform domain into being a full fledged IOAS

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-14 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Friday, May 14, 2021 9:40 PM > > On Fri, May 14, 2021 at 01:17:23PM +, Tian, Kevin wrote: > > > From: Jason Gunthorpe > > > Sent: Thursday, May 13, 2021 8:01 PM > > > > > > On Thu, May 13, 2021 at 03:28:52AM +, Tian, Kevin wrote: > > > > > > > Are you spec

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-14 Thread Liu Yi L
Morning Jason, On Fri, 14 May 2021 10:39:39 -0300, Jason Gunthorpe wrote: > On Fri, May 14, 2021 at 01:17:23PM +, Tian, Kevin wrote: > > > From: Jason Gunthorpe > > > Sent: Thursday, May 13, 2021 8:01 PM > > > > > > On Thu, May 13, 2021 at 03:28:52AM +, Tian, Kevin wrote: > > > > > >

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-14 Thread Jason Gunthorpe
On Fri, May 14, 2021 at 01:17:23PM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Thursday, May 13, 2021 8:01 PM > > > > On Thu, May 13, 2021 at 03:28:52AM +, Tian, Kevin wrote: > > > > > Are you specially concerned about this iommu_device hack which > > > directly connects md

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-14 Thread Jason Gunthorpe
On Fri, May 14, 2021 at 12:58:10PM +, Tian, Kevin wrote: > This avoids changing every iommu ops to include a PASID and forcing > the upper-layer drivers to do it differently between pdev and mdev. > Actually this was a main motivation when working out aux domain > proposal with Joerg two years

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-14 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, May 13, 2021 8:01 PM > > On Thu, May 13, 2021 at 03:28:52AM +, Tian, Kevin wrote: > > > Are you specially concerned about this iommu_device hack which > > directly connects mdev_device to iommu layer or the entire removed > > logic including the aux

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-14 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Friday, May 14, 2021 8:19 PM > > On Fri, May 14, 2021 at 06:54:16AM +, Tian, Kevin wrote: > > > From: Tian, Kevin > > > Sent: Friday, May 14, 2021 2:28 PM > > > > > > > From: Jason Gunthorpe > > > > Sent: Thursday, May 13, 2021 8:01 PM > > > > > > > > On Thu,

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-14 Thread Jason Gunthorpe
On Fri, May 14, 2021 at 06:54:16AM +, Tian, Kevin wrote: > > From: Tian, Kevin > > Sent: Friday, May 14, 2021 2:28 PM > > > > > From: Jason Gunthorpe > > > Sent: Thursday, May 13, 2021 8:01 PM > > > > > > On Thu, May 13, 2021 at 03:28:52AM +, Tian, Kevin wrote: > > > > > > > Are you speci

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-13 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Friday, May 14, 2021 2:28 PM > > > From: Jason Gunthorpe > > Sent: Thursday, May 13, 2021 8:01 PM > > > > On Thu, May 13, 2021 at 03:28:52AM +, Tian, Kevin wrote: > > > > > Are you specially concerned about this iommu_device hack which > > > directly connects mdev_

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-13 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, May 13, 2021 8:01 PM > > On Thu, May 13, 2021 at 03:28:52AM +, Tian, Kevin wrote: > > > Are you specially concerned about this iommu_device hack which > > directly connects mdev_device to iommu layer or the entire removed > > logic including the aux

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-13 Thread Jason Gunthorpe
On Thu, May 13, 2021 at 03:28:52AM +, Tian, Kevin wrote: > Are you specially concerned about this iommu_device hack which > directly connects mdev_device to iommu layer or the entire removed > logic including the aux domain concept? For the former we are now > following up the referred threa

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-12 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Monday, May 10, 2021 11:55 PM > > On Mon, May 10, 2021 at 08:54:02AM +0200, Christoph Hellwig wrote: > > The iommu_device field in struct mdev_device has never been used > > since it was added more than 2 years ago. > > > > Signed-off-by: Christoph Hellwig > > ---

Re: [PATCH 3/6] vfio: remove the unused mdev iommu hook

2021-05-10 Thread Jason Gunthorpe
On Mon, May 10, 2021 at 08:54:02AM +0200, Christoph Hellwig wrote: > The iommu_device field in struct mdev_device has never been used > since it was added more than 2 years ago. > > Signed-off-by: Christoph Hellwig > --- > drivers/vfio/vfio_iommu_type1.c | 132 ++-- >