Re: [PATCH v3 4/8] iommufd: Add iommufd fault object

2024-03-22 Thread Jason Gunthorpe
On Wed, Mar 20, 2024 at 04:18:05PM +, Shameerali Kolothum Thodi wrote: > > What I have noticed is that, > -read interface works fine and I can receive struct tiommu_hwpt_pgfault data. > -But once Guest handles the page faults and returns the page response, > the write to fault fd never

Re: [PATCH v3 4/8] iommufd: Add iommufd fault object

2024-03-22 Thread Jason Gunthorpe
On Fri, Mar 15, 2024 at 09:46:06AM +0800, Baolu Lu wrote: > On 3/9/24 2:03 AM, Jason Gunthorpe wrote: > > On Mon, Jan 22, 2024 at 03:38:59PM +0800, Lu Baolu wrote: > > > --- /dev/null > > > +++ b/drivers/iommu/iommufd/fault.c > > > @@ -0,0 +1,255 @@ > > > +// SPDX-License-Identifier: GPL-2.0-only

Re: [PATCH v3 5/8] iommufd: Associate fault object with iommufd_hw_pgtable

2024-03-22 Thread Jason Gunthorpe
On Fri, Mar 15, 2024 at 09:16:43AM +0800, Baolu Lu wrote: > On 3/9/24 3:05 AM, Jason Gunthorpe wrote: > > On Mon, Jan 22, 2024 at 03:39:00PM +0800, Lu Baolu wrote: > > > > > @@ -411,6 +414,8 @@ enum iommu_hwpt_data_type { > > >* @__reserved: Must be 0 > > >* @data_type: One of enum

Re: [PATCH v3 3/8] iommufd: Add fault and response message definitions

2024-03-22 Thread Jason Gunthorpe
On Thu, Mar 14, 2024 at 09:41:45PM +0800, Baolu Lu wrote: > On 2024/3/9 1:50, Jason Gunthorpe wrote: > > On Mon, Jan 22, 2024 at 03:38:58PM +0800, Lu Baolu wrote: > > > > > +/** > > > + * enum iommu_hwpt_pgfault_flags - flags for struct iommu_hwpt_pgfault > > > + *

Re: [PATCH v3 2/8] iommu/sva: Use iopf domain attach/detach interface

2024-03-22 Thread Jason Gunthorpe
On Thu, Mar 14, 2024 at 03:41:23PM +0800, Baolu Lu wrote: > The whole cookie mechanism aims to address two things: > > - Extend the domain lifetime until all pending page faults are > resolved. Like you answered, I think the flush is a simpler scheme.. > - Associate information about the iommu