Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-20 Thread Alex Williamson
On Tue, 13 Jun 2023 15:01:35 + "Liu, Yi L" wrote: > > From: Alex Williamson > > Sent: Tuesday, June 13, 2023 10:48 PM > > > > On Tue, 13 Jun 2023 14:33:01 + > > "Liu, Yi L" wrote: > > > > > > From: Alex Williamson > > > > Sent: Tuesday, June 13, 2023 10:19 PM > > > > > > > > On Tue

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-20 Thread Alex Williamson
[Sorry for breaking threading, replying to my own message id with reply content from Yi since the Cc list got broken] On Tue, 13 Jun 2023 15:28:06 + "Liu, Yi L" wrote: > > From: Alex Williamson > > Sent: Tuesday, June 13, 2023 11:13 PM > > > > On Tue, 13 Jun 2023 15:01:35 + > > "Liu,

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-14 Thread Jason Gunthorpe
On Wed, Jun 14, 2023 at 01:12:50PM +, Liu, Yi L wrote: > diff --git a/drivers/vfio/group.c b/drivers/vfio/group.c > index 41a09a2df690..c2e0128323a7 100644 > --- a/drivers/vfio/group.c > +++ b/drivers/vfio/group.c > @@ -687,16 +687,6 @@ static struct vfio_group > *vfio_group_find_or_alloc(stru

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-14 Thread Liu, Yi L
> From: Jason Gunthorpe > Sent: Wednesday, June 14, 2023 8:23 PM > On Wed, Jun 14, 2023 at 06:20:10AM +, Tian, Kevin wrote: > > > From: Liu, Yi L > > > Sent: Wednesday, June 14, 2023 2:14 PM > > > > > > > > > > With that I think Jason's suggestion is to lift that test into main.c: > > > > > >

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-14 Thread Jason Gunthorpe
On Wed, Jun 14, 2023 at 06:20:10AM +, Tian, Kevin wrote: > > From: Liu, Yi L > > Sent: Wednesday, June 14, 2023 2:14 PM > > > > > > > With that I think Jason's suggestion is to lift that test into main.c: > > > > > > int vfio_register_group_dev(struct vfio_device *device) > > > { > > > /*

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-13 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Wednesday, June 14, 2023 2:14 PM > > > > With that I think Jason's suggestion is to lift that test into main.c: > > > > int vfio_register_group_dev(struct vfio_device *device) > > { > > /* > > * VFIO always sets IOMMU_CACHE because we offer no way for > userspa

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-13 Thread Liu, Yi L
> From: Tian, Kevin > Sent: Wednesday, June 14, 2023 1:42 PM > > > From: Liu, Yi L > > Sent: Wednesday, June 14, 2023 11:24 AM > > > > > From: Alex Williamson > > > Sent: Wednesday, June 14, 2023 4:11 AM > > > > > > On Tue, 13 Jun 2023 14:35:09 -0300 > > > Jason Gunthorpe wrote: > > > > > > >

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-13 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Wednesday, June 14, 2023 11:24 AM > > > From: Alex Williamson > > Sent: Wednesday, June 14, 2023 4:11 AM > > > > On Tue, 13 Jun 2023 14:35:09 -0300 > > Jason Gunthorpe wrote: > > > > > On Tue, Jun 13, 2023 at 11:15:11AM -0600, Alex Williamson wrote: > > > > [Sorry for

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-13 Thread Liu, Yi L
> From: Alex Williamson > Sent: Wednesday, June 14, 2023 4:11 AM > > On Tue, 13 Jun 2023 14:35:09 -0300 > Jason Gunthorpe wrote: > > > On Tue, Jun 13, 2023 at 11:15:11AM -0600, Alex Williamson wrote: > > > [Sorry for breaking threading, replying to my own message id with reply > > > content fr

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-13 Thread Alex Williamson
On Tue, 13 Jun 2023 14:35:09 -0300 Jason Gunthorpe wrote: > On Tue, Jun 13, 2023 at 11:15:11AM -0600, Alex Williamson wrote: > > [Sorry for breaking threading, replying to my own message id with reply > > content from Yi since the Cc list got broken] > > Yikes it is really busted, I think I f

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-13 Thread Jason Gunthorpe
On Tue, Jun 13, 2023 at 11:15:11AM -0600, Alex Williamson wrote: > [Sorry for breaking threading, replying to my own message id with reply > content from Yi since the Cc list got broken] Yikes it is really busted, I think I fixed it? > If we renamed your function above to vfio_device_has_iommu_g

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-13 Thread Liu, Yi L
> From: Alex Williamson > Sent: Tuesday, June 13, 2023 10:48 PM > > On Tue, 13 Jun 2023 14:33:01 + > "Liu, Yi L" wrote: > > > > From: Alex Williamson > > > Sent: Tuesday, June 13, 2023 10:19 PM > > > > > > On Tue, 13 Jun 2023 05:53:42 + > > > "Liu, Yi L" wrote: > > > > > > > > From: A

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-13 Thread Alex Williamson
On Tue, 13 Jun 2023 14:33:01 + "Liu, Yi L" wrote: > > From: Alex Williamson > > Sent: Tuesday, June 13, 2023 10:19 PM > > > > On Tue, 13 Jun 2023 05:53:42 + > > "Liu, Yi L" wrote: > > > > > > From: Alex Williamson > > > > Sent: Tuesday, June 13, 2023 6:42 AM > > > > > > > > On Fri,

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-13 Thread Liu, Yi L
> From: Alex Williamson > Sent: Tuesday, June 13, 2023 10:19 PM > > On Tue, 13 Jun 2023 05:53:42 + > "Liu, Yi L" wrote: > > > > From: Alex Williamson > > > Sent: Tuesday, June 13, 2023 6:42 AM > > > > > > On Fri, 2 Jun 2023 05:16:50 -0700 > > > Yi Liu wrote: > > > > > > > This moves the

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-13 Thread Alex Williamson
On Tue, 13 Jun 2023 05:53:42 + "Liu, Yi L" wrote: > > From: Alex Williamson > > Sent: Tuesday, June 13, 2023 6:42 AM > > > > On Fri, 2 Jun 2023 05:16:50 -0700 > > Yi Liu wrote: > > > > > This moves the noiommu device determination and noiommu taint out of > > > vfio_group_find_or_alloc

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-12 Thread Liu, Yi L
> From: Alex Williamson > Sent: Tuesday, June 13, 2023 6:42 AM > > On Fri, 2 Jun 2023 05:16:50 -0700 > Yi Liu wrote: > > > This moves the noiommu device determination and noiommu taint out of > > vfio_group_find_or_alloc(). noiommu device is determined in > > __vfio_register_dev() and result i

Re: [Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-12 Thread Alex Williamson
On Fri, 2 Jun 2023 05:16:50 -0700 Yi Liu wrote: > This moves the noiommu device determination and noiommu taint out of > vfio_group_find_or_alloc(). noiommu device is determined in > __vfio_register_dev() and result is stored in flag vfio_device->noiommu, > the noiommu taint is added in the end

[Intel-gfx] [PATCH v12 21/24] vfio: Determine noiommu device in __vfio_register_dev()

2023-06-02 Thread Yi Liu
This moves the noiommu device determination and noiommu taint out of vfio_group_find_or_alloc(). noiommu device is determined in __vfio_register_dev() and result is stored in flag vfio_device->noiommu, the noiommu taint is added in the end of __vfio_register_dev(). This is also a preparation for c