RE: [PATCH v6 06/10] iommufd: Add iommufd fault object

2024-06-17 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, June 12, 2024 9:24 PM > > On Fri, Jun 07, 2024 at 09:17:28AM +, Tian, Kevin wrote: > > > From: Lu Baolu > > > Sent: Monday, May 27, 2024 12:05 PM > > > > > > +static ssize_t iommufd_fault_fops_read(struct file *filep, char __user > *buf, > > > +

Re: [PATCH v6 06/10] iommufd: Add iommufd fault object

2024-06-12 Thread Baolu Lu
On 6/12/24 9:25 PM, Jason Gunthorpe wrote: On Sat, Jun 08, 2024 at 05:58:34PM +0800, Baolu Lu wrote: +static int iommufd_fault_fops_release(struct inode *inode, struct file *filep) +{ + struct iommufd_fault *fault = filep->private_data; + + iommufd_ctx_put(fault->ictx); + refc

Re: [PATCH v6 06/10] iommufd: Add iommufd fault object

2024-06-12 Thread Jason Gunthorpe
On Sat, Jun 08, 2024 at 05:58:34PM +0800, Baolu Lu wrote: > > > +static int iommufd_fault_fops_release(struct inode *inode, struct file > > > *filep) > > > +{ > > > + struct iommufd_fault *fault = filep->private_data; > > > + > > > + iommufd_ctx_put(fault->ictx); > > > + refcount_dec(&fault->obj.

Re: [PATCH v6 06/10] iommufd: Add iommufd fault object

2024-06-12 Thread Jason Gunthorpe
On Fri, Jun 07, 2024 at 09:17:28AM +, Tian, Kevin wrote: > > From: Lu Baolu > > Sent: Monday, May 27, 2024 12:05 PM > > > > +static ssize_t iommufd_fault_fops_read(struct file *filep, char __user > > *buf, > > + size_t count, loff_t *ppos) > > +{ > > + size

Re: [PATCH v6 06/10] iommufd: Add iommufd fault object

2024-06-08 Thread Baolu Lu
On 6/7/24 5:17 PM, Tian, Kevin wrote: From: Lu Baolu Sent: Monday, May 27, 2024 12:05 PM +static ssize_t iommufd_fault_fops_read(struct file *filep, char __user *buf, + size_t count, loff_t *ppos) +{ + size_t fault_size = sizeof(struct iommu_hwpt_pgfau

RE: [PATCH v6 06/10] iommufd: Add iommufd fault object

2024-06-07 Thread Tian, Kevin
> From: Lu Baolu > Sent: Monday, May 27, 2024 12:05 PM > > +static ssize_t iommufd_fault_fops_read(struct file *filep, char __user *buf, > +size_t count, loff_t *ppos) > +{ > + size_t fault_size = sizeof(struct iommu_hwpt_pgfault); > + struct iommufd_fa

[PATCH v6 06/10] iommufd: Add iommufd fault object

2024-05-26 Thread Lu Baolu
An iommufd fault object provides an interface for delivering I/O page faults to user space. These objects are created and destroyed by user space, and they can be associated with or dissociated from hardware page table objects during page table allocation or destruction. User space interacts with