public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "Liu, Yi L" <yi.l.liu@intel.com>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"jgg@nvidia.com" <jgg@nvidia.com>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"baolu.lu@linux.intel.com" <baolu.lu@linux.intel.com>,
	"cohuck@redhat.com" <cohuck@redhat.com>,
	"eric.auger@redhat.com" <eric.auger@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"mjrosato@linux.ibm.com" <mjrosato@linux.ibm.com>,
	"chao.p.peng@linux.intel.com" <chao.p.peng@linux.intel.com>,
	"yi.y.sun@linux.intel.com" <yi.y.sun@linux.intel.com>,
	"peterx@redhat.com" <peterx@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"shameerali.kolothum.thodi@huawei.com" 
	<shameerali.kolothum.thodi@huawei.com>,
	"lulu@redhat.com" <lulu@redhat.com>,
	"suravee.suthikulpanit@amd.com" <suravee.suthikulpanit@amd.com>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"Duan, Zhenzhong" <zhenzhong.duan@intel.com>
Subject: Re: [PATCH v3 3/4] iommufd: Add IOMMU_DEVICE_GET_HW_INFO
Date: Tue, 23 May 2023 22:19:48 -0700	[thread overview]
Message-ID: <ZG2edCPs7qPgABby@Asurada-Nvidia> (raw)
In-Reply-To: <BN9PR11MB527674C06FAF4DD211B342BB8C419@BN9PR11MB5276.namprd11.prod.outlook.com>

On Wed, May 24, 2023 at 05:00:40AM +0000, Tian, Kevin wrote:
> > > > +};
> > > > +#define IOMMU_DEVICE_GET_HW_INFO _IO(IOMMUFD_TYPE,
> > > > IOMMUFD_CMD_DEVICE_GET_HW_INFO)
> > > >  #endif
> > >
> > > Here we have a naming confusion.
> > >
> > > 'IOMMU' is the prefix of iommufd ioctls.
> > >
> > > 'DEVICE' is the subjective.
> > >
> > > Then "GET_HW_INFO" implies getting hardware info related to
> > > this device. then it should not be restricted to the iommu info.
> > >
> > > with that it's clearer to call it IOMMU_DEVICE_GET_IOMMU_INFO.
> >
> > Though the entire ioctl is tied to the input "dev_id", I think
> > it isn't really about the device corresponding to the dev_id,
> > similar to the IOMMU_HWPT_ALLOC having a dev_id input too. So,
> > I think the "IOMMU_DEVICE" here should be interpreted simply
> > as "an iommu device". We could also highlight this somewhere
> > in the header.
> 
> yes this is a good view of it. with that it's not necessary to have
> a 'DEVICE' notation in the name which looks confusing with dev_id.
> 
> Just IOMMU_GET_HW_INFO for the iommu behind the specified dev_id.
> 
> then keep the structure name as iommu_hw_info.

That'd be neat.

> > With that being said, IOMMU_DEVICE_SET/UNSET_DATA should be
> > renamed to IOMMU_DEVICE_SET/UNSET_DEV_DATA -- "DEVICE" is the
> > iommu device while the "DEV_DATA" is a given device that's
> > behind the iommu.
> 
> this then becomes IOMMU_SET/UNSET_DEV_DATA.

Ack.

Thanks
Nic

  reply	other threads:[~2023-05-24  5:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 14:30 [PATCH v3 0/4] iommufd: Add iommu hardware info reporting Yi Liu
2023-05-11 14:30 ` [PATCH v3 1/4] iommu: Move dev_iommu_ops() to private header Yi Liu
2023-05-11 14:30 ` [PATCH v3 2/4] iommu: Add new iommu op to get iommu hardware information Yi Liu
2023-05-11 14:30 ` [PATCH v3 3/4] iommufd: Add IOMMU_DEVICE_GET_HW_INFO Yi Liu
2023-05-12  5:38   ` Baolu Lu
2023-05-15  6:14     ` Liu, Yi L
2023-05-16  1:49       ` Baolu Lu
2023-05-19  8:42   ` Tian, Kevin
2023-05-19 18:30     ` Nicolin Chen
2023-05-24  5:00       ` Tian, Kevin
2023-05-24  5:19         ` Nicolin Chen [this message]
     [not found]   ` <BL1PR11MB527177A3860E10818E9761938C7C9@BL1PR11MB5271.namprd11.prod.outlook.com>
2023-05-19  9:15     ` Tian, Kevin
2023-05-11 14:30 ` [PATCH v3 4/4] iommufd/selftest: Add coverage for IOMMU_DEVICE_GET_HW_INFO ioctl Yi Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZG2edCPs7qPgABby@Asurada-Nvidia \
    --to=nicolinc@nvidia.com \
    --cc=alex.williamson@redhat.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=cohuck@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=iommu@lists.linux.dev \
    --cc=jasowang@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lulu@redhat.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=peterx@redhat.com \
    --cc=robin.murphy@arm.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=yi.l.liu@intel.com \
    --cc=yi.y.sun@linux.intel.com \
    --cc=zhenzhong.duan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox