All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Jason Gunthorpe <jgg@nvidia.com>, Nicolin Chen <nicolinc@nvidia.com>
Cc: will@kernel.org, joro@8bytes.org, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: Sort out domain user data
Date: Mon, 3 Mar 2025 17:47:46 +0000	[thread overview]
Message-ID: <e92da382-b5a3-400a-a382-4ffb35397c81@arm.com> (raw)
In-Reply-To: <20250303172746.GB133783@nvidia.com>

On 03/03/2025 5:27 pm, Jason Gunthorpe wrote:
> On Fri, Feb 28, 2025 at 12:20:53PM -0800, Nicolin Chen wrote:
>> On Fri, Feb 28, 2025 at 11:31:11AM +0000, Robin Murphy wrote:
>>> +enum iommu_domain_cookie_type {
>>> +	IOMMU_NO_COOKIE,
>>> +	IOMMU_DMA_IOVA_COOKIE,
>>> +	IOMMU_DMA_MSI_COOKIE,
>>> +	IOMMU_FAULT_HANDLER_COOKIE,
>>> +	IOMMU_SVA_COOKIE,
>>
>> I would like to change them to IOMMU_COOKIE_* so the iommufd one
>> wouldn't feel redundant like "IOMMU_IOMMUFD_COOKIE".

Heh, I guess strictly it might just be IOMMUFD_COOKIE, since what I've 
really done here is messily overlap a new IOMMU_x namespace with the 
original IOMMU_DMA_x one... :)

>> If you don't mind, I will make the following list:
>> -	IOMMU_NO_COOKIE,
>> -	IOMMU_DMA_IOVA_COOKIE,
>> -	IOMMU_DMA_MSI_COOKIE,
>> -	IOMMU_FAULT_HANDLER_COOKIE,
>> -	IOMMU_SVA_COOKIE,
>> +	IOMMU_COOKIE_NONE,
>> +	IOMMU_COOKIE_DMA_IOVA,
>> +	IOMMU_COOKIE_DMA_MSI,
>> +	IOMMU_COOKIE_FAULT_HANDLER,
>> +	IOMMU_COOKIE_SVA,
>> +	IOMMU_COOKIE_IOMMUFD,
> 
> I like that better too

...but yeah, no objection to going this way for consistency - splitting 
into IOMMU_x_DMA does seem more logical and understandable than the 
other alternative of having one weird IOMMU_FD_x symbol.

Thanks,
Robin.

      reply	other threads:[~2025-03-03 17:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 11:31 [PATCH] iommu: Sort out domain user data Robin Murphy
2025-02-28 17:38 ` Jason Gunthorpe
2025-02-28 20:20 ` Nicolin Chen
2025-03-03 17:27   ` Jason Gunthorpe
2025-03-03 17:47     ` Robin Murphy [this message]

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=e92da382-b5a3-400a-a382-4ffb35397c81@arm.com \
    --to=robin.murphy@arm.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.