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

2024-03-14 Thread Baolu Lu
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 +/* Copyright (C) 2024 Intel Corporation + */ +#define pr_fmt(fmt) "iommufd: " fmt +

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

2024-03-14 Thread Baolu Lu
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 iommu_hwpt_data_type * @data_len: Length of the type specific data + * @fault_id: The

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

2024-03-14 Thread Baolu Lu
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 + * @IOMMU_PGFAULT_FLAGS_PASID_VALID: The pasid field of the fault data is + *

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

2024-03-14 Thread Baolu Lu
On 2024/3/9 1:46, Jason Gunthorpe wrote: On Mon, Jan 22, 2024 at 03:38:57PM +0800, Lu Baolu wrote: @@ -215,7 +202,23 @@ static struct iopf_group *iopf_group_alloc(struct iommu_fault_param *iopf_param, group = abort_group; } + cookie =