[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240819182035.GP2032816@nvidia.com>
Date: Mon, 19 Aug 2024 15:20:35 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: kevin.tian@...el.com, will@...nel.org, joro@...tes.org,
suravee.suthikulpanit@....com, robin.murphy@....com,
dwmw2@...radead.org, baolu.lu@...ux.intel.com, shuah@...nel.org,
linux-kernel@...r.kernel.org, iommu@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v1 08/16] iommufd/viommu: Add IOMMU_VIOMMU_INVALIDATE
ioctl
On Mon, Aug 19, 2024 at 10:49:56AM -0700, Nicolin Chen wrote:
> On Mon, Aug 19, 2024 at 02:30:56PM -0300, Jason Gunthorpe wrote:
> > On Thu, Aug 15, 2024 at 04:51:39PM -0700, Nicolin Chen wrote:
> > > On Thu, Aug 15, 2024 at 08:24:05PM -0300, Jason Gunthorpe wrote:
> > > > On Wed, Aug 07, 2024 at 01:10:49PM -0700, Nicolin Chen wrote:
> > > > > @@ -946,4 +947,40 @@ struct iommu_viommu_unset_vdev_id {
> > > > > __aligned_u64 vdev_id;
> > > > > };
> > > > > #define IOMMU_VIOMMU_UNSET_VDEV_ID _IO(IOMMUFD_TYPE, IOMMUFD_CMD_VIOMMU_UNSET_VDEV_ID)
> > > > > +
> > > > > +/**
> > > > > + * enum iommu_viommu_invalidate_data_type - VIOMMU Cache Invalidate Data Type
> > > > > + * @IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3: Invalidation data for ARM SMMUv3
> > > > > + */
> > > > > +enum iommu_viommu_invalidate_data_type {
> > > > > + IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3,
> > > > > +};
> > > >
> > > > =1 here I think. Lets try to avoid 0 for the types..
> > > >
> > > > And this shouldn't be in this patch
> > > >
> > > > But also we can probably just use reuse enum iommu_hwpt_invalidate_data_type
> > > > here?
> > >
> > > Would that force IOMMU drivers to implement both hwpt and viommu
> > > invalidations? SMMUv3 driver would implement both anyway though..
> >
> > I wouldn't say force, just that they have to use a consistent
> > numbering if they do choose to do both.
>
> But if we duplicate a driver type for two IOCTLs, that assumes
> our ABI supports both IOCTLs? No?
No, it is just a numbering system to label the struct layout.
Jason
Powered by blists - more mailing lists