RE: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-12 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Sent: Friday, November 10, 2023 9:09 PM >Subject: Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend > >On 10/11/2023 03:15, Duan, Zhenzhong wrote: >> Hi Jason, Joao, >> >>> -Original

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-10 Thread Joao Martins
On 10/11/2023 03:15, Duan, Zhenzhong wrote: > Hi Jason, Joao, > >> -Original Message- >> From: Jason Gunthorpe >> Sent: Thursday, November 9, 2023 10:35 PM >> Subject: Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend >> >> On T

RE: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-09 Thread Duan, Zhenzhong
Hi Jason, Joao, >-Original Message- >From: Jason Gunthorpe >Sent: Thursday, November 9, 2023 10:35 PM >Subject: Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend > >On Thu, Nov 09, 2023 at 01:21:59PM +, Joao Martins wrote: >> On 09/11/2023 13:0

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-09 Thread Jason Gunthorpe
On Thu, Nov 09, 2023 at 01:21:59PM +, Joao Martins wrote: > On 09/11/2023 13:09, Jason Gunthorpe wrote: > > On Thu, Nov 09, 2023 at 01:03:02PM +, Joao Martins wrote: > > > >>> I am not talking about mdevs; but rather the regular (non mdev) case not > >>> being > >>> able to use dirty trac

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-09 Thread Joao Martins
On 09/11/2023 13:09, Jason Gunthorpe wrote: > On Thu, Nov 09, 2023 at 01:03:02PM +, Joao Martins wrote: > >>> I am not talking about mdevs; but rather the regular (non mdev) case not >>> being >>> able to use dirty tracking with autodomains hwpt allocation. >> >> ... without any vIOMMU. > >

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-09 Thread Jason Gunthorpe
On Thu, Nov 09, 2023 at 01:03:02PM +, Joao Martins wrote: > > I am not talking about mdevs; but rather the regular (non mdev) case not > > being > > able to use dirty tracking with autodomains hwpt allocation. > > ... without any vIOMMU. Ah, well, that is troublesome isn't it.. So do we te

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-09 Thread Joao Martins
On 09/11/2023 12:59, Joao Martins wrote: > On 09/11/2023 12:57, Jason Gunthorpe wrote: >> On Thu, Nov 09, 2023 at 12:17:35PM +, Joao Martins wrote: >>> On 08/11/2023 12:48, Jason Gunthorpe wrote: On Wed, Nov 08, 2023 at 07:16:52AM +, Duan, Zhenzhong wrote: >>> +ret = iommu

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-09 Thread Jason Gunthorpe
On Thu, Nov 09, 2023 at 12:17:35PM +, Joao Martins wrote: > > > On 08/11/2023 12:48, Jason Gunthorpe wrote: > > On Wed, Nov 08, 2023 at 07:16:52AM +, Duan, Zhenzhong wrote: > > > +ret = iommufd_backend_alloc_hwpt(iommufd, vbasedev->devid, > +

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-09 Thread Joao Martins
On 09/11/2023 12:57, Jason Gunthorpe wrote: > On Thu, Nov 09, 2023 at 12:17:35PM +, Joao Martins wrote: >> On 08/11/2023 12:48, Jason Gunthorpe wrote: >>> On Wed, Nov 08, 2023 at 07:16:52AM +, Duan, Zhenzhong wrote: >>> >> +ret = iommufd_backend_alloc_hwpt(iommufd, vbasedev->devid,

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-09 Thread Joao Martins
On 08/11/2023 12:48, Jason Gunthorpe wrote: > On Wed, Nov 08, 2023 at 07:16:52AM +, Duan, Zhenzhong wrote: > +ret = iommufd_backend_alloc_hwpt(iommufd, vbasedev->devid, + container->ioas_id, &hwpt_id); + +if (ret) { +

RE: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-08 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Gunthorpe >Sent: Wednesday, November 8, 2023 10:19 PM >Subject: Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend > >On Wed, Nov 08, 2023 at 01:25:34PM +, Duan, Zhenzhong wrote: > >> >I was expecting t

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-08 Thread Jason Gunthorpe
On Wed, Nov 08, 2023 at 01:25:34PM +, Duan, Zhenzhong wrote: > >I was expecting that hwpt manipulation would be done exclusively > >inside the device-specific vIOMMU userspace driver. Generic code paths > >that don't have that knowledge should use the IOAS for everything > > Yes, this way we

RE: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-08 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Gunthorpe >Sent: Wednesday, November 8, 2023 8:48 PM >Subject: Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend > >On Wed, Nov 08, 2023 at 07:16:52AM +, Duan, Zhenzhong wrote: > >> >> +ret = i

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-08 Thread Jason Gunthorpe
On Wed, Nov 08, 2023 at 07:16:52AM +, Duan, Zhenzhong wrote: > >> +ret = iommufd_backend_alloc_hwpt(iommufd, vbasedev->devid, > >> + container->ioas_id, &hwpt_id); > >> + > >> +if (ret) { > >> +error_setg_errno(errp, errno, "error alloc shado

RE: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-07 Thread Duan, Zhenzhong
Hi Matthew, >-Original Message- >From: Matthew Rosato >Sent: Wednesday, November 8, 2023 11:00 AM >Subject: Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend > >On 11/2/23 3:12 AM, Zhenzhong Duan wrote: >> From: Yi Liu >> >> Add the io

RE: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-07 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Tuesday, November 7, 2023 9:41 PM >Subject: Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend > >On 11/2/23 08:12, Zhenzhong Duan wrote: >> From: Yi Liu >> >> Add the iommufd bac

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-07 Thread Matthew Rosato
On 11/2/23 3:12 AM, Zhenzhong Duan wrote: > From: Yi Liu > > Add the iommufd backend. The IOMMUFD container class is implemented > based on the new /dev/iommu user API. This backend obviously depends > on CONFIG_IOMMUFD. > > So far, the iommufd backend doesn't support dirty page sync yet due > t

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-07 Thread Cédric Le Goater
On 11/2/23 08:12, Zhenzhong Duan wrote: From: Yi Liu Add the iommufd backend. The IOMMUFD container class is implemented based on the new /dev/iommu user API. This backend obviously depends on CONFIG_IOMMUFD. So far, the iommufd backend doesn't support dirty page sync yet due to missing suppor

[PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-02 Thread Zhenzhong Duan
From: Yi Liu Add the iommufd backend. The IOMMUFD container class is implemented based on the new /dev/iommu user API. This backend obviously depends on CONFIG_IOMMUFD. So far, the iommufd backend doesn't support dirty page sync yet due to missing support in the host kernel. Co-authored-by: Eri