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

From: Jason Gunthorpe
Date: Tue Jul 09 2024 - 13:14:43 EST


On Mon, Jul 08, 2024 at 11:36:57AM -0700, Nicolin Chen wrote:
> Maybe something like this?
>
> struct iommu_viommu_event_arm_smmuv3 {
> u64 evt[4];
> };
>
> struct iommu_viommu_event_tegra241_cmdqv {
> u64 vcmdq_err_map[2];
> };
>
> enum iommu_event_type {
> IOMMM_HWPT_EVENT_TYPE_IOPF,
> IOMMU_VIOMMU_EVENT_TYPE_SMMUv3,
> IOMMU_VIOMMU_EVENT_TYPE_TEGRA241_CMDQV,
> };
>
> struct iommu_event_alloc {
> __u32 size;
> __u32 flags;
> __u32 out_event_id;
> __u32 out_event_fd;
> __u32 type;
> __u32 _reserved;
> };
>
> It can be "report" if you prefer.

Yeah, something like that makes sense to me. The other question is if
you want to multiplex the SMMUv3 and CMDQV on the same FD?

Or multiplex physical smmus on the same FD.

We are potentially talking about 5-10 physical smmus and 2-3 FDs per
physical? Does that scare anyone?

Jason