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

2024-03-25 Thread Baolu Lu
On 3/23/24 1:22 AM, Jason Gunthorpe wrote: 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,

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

2024-03-25 Thread Baolu Lu
On 3/25/24 11:26 AM, Baolu Lu wrote: On 3/23/24 1:22 AM, Jason Gunthorpe wrote: 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 pag

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

2024-03-25 Thread Baolu Lu
On 2024/3/23 1:09, Jason Gunthorpe wrote: 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-Identifie

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

2024-03-25 Thread Baolu Lu
On 2024/3/23 1:06, Jason Gunthorpe wrote: 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

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

2024-03-25 Thread Baolu Lu
On 3/23/24 12:59 AM, Jason Gunthorpe wrote: 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..

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

2024-03-25 Thread Baolu Lu
On 3/23/24 1:04 AM, Jason Gunthorpe wrote: +struct iommu_hwpt_pgfault { + __u32 size; + __u32 flags; + __u32 dev_id; + __u32 pasid; + __u32 grpid; + __u32 perm; + __u64 addr; +}; Do we need an addr + size here? I've seen a few things where I wonder if th