lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0bd5614d-81f7-4b06-9dc0-c757e6a401bf@amd.com>
Date: Fri, 9 May 2025 17:22:13 +0530
From: Vasant Hegde <vasant.hegde@....com>
To: Nicolin Chen <nicolinc@...dia.com>, Jason Gunthorpe <jgg@...dia.com>
Cc: kevin.tian@...el.com, corbet@....net, will@...nel.org,
 bagasdotme@...il.com, robin.murphy@....com, joro@...tes.org,
 thierry.reding@...il.com, vdumpa@...dia.com, jonathanh@...dia.com,
 shuah@...nel.org, jsnitsel@...hat.com, nathan@...nel.org,
 peterz@...radead.org, yi.l.liu@...el.com, mshavit@...gle.com,
 praan@...gle.com, zhangzekun11@...wei.com, iommu@...ts.linux.dev,
 linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-tegra@...r.kernel.org,
 linux-kselftest@...r.kernel.org, patches@...ts.linux.dev, mochs@...dia.com,
 alok.a.tiwari@...cle.com,
 Suravee Suthikulpanit <suravee.suthikulpanit@....com>
Subject: Re: [PATCH v3 11/23] iommufd/viommu: Add IOMMUFD_CMD_VQUEUE_ALLOC
 ioctl

Hi Nicolin, Jason,


On 5/8/2025 10:42 PM, Nicolin Chen wrote:
> On Thu, May 08, 2025 at 09:14:56AM -0300, Jason Gunthorpe wrote:
>> On Wed, May 07, 2025 at 10:56:17PM -0700, Nicolin Chen wrote:
>>
>>> What I am not sure is if the HW allows setting the ComWaitIntEn bit
>>> after CmdBufEn=1, which seems to be unlikely but the spec does not
>>> highlight. If so, this would be an modification to the HW QUEUE, in
>>> which case we could either do an relocation of the HW QUEUE (where
>>> we can set the flag in the 2nd allocation) or add an new option via
>>> IOMMUFD_CMD_OPTION (as Kevin suggested), and I think it should be
>>> a per-HW_QUEUE option since it doesn't affect other type of queues
>>> like Event/PRR Log Buffers.
>>
>> The main question is if the control is global to the entire VIOMMU and
>> all its HW QUEUE's or local to a single HW QUEUE.
> 
> Oh, that's right.. I recall AMD only has one Command Buffer,
> but can have dual Event Log Buffers and dual PPR Log Buffers.

Right.

> 
> And the EventIntEn or PprIntEn bit seem to be global for the
> dual buffers..

Yes. But there are other bit to configure dual buffers etc.
(like DualEventLogEn).

> 
>> If it is global then some "modify viommu" operation should be used to
>> change it.
>>
>> If it is local then some "modify hw queu" operation.
>>
>> IOMMUFD_CMD_OPTION could be used with an object_id == VIOMMU as a kind
>> of modify..
> 
> Vasant can confirm. But looks like it should be a vIOMMU
> option.

I think CMD_OPTION will work. So something like below?

if (cmd_option_id == IOMMU_OPTION_VIOMMU && cmd->object_id == viommu_id)
	iommufd_viommu->ops->viommu_options() ?


-Vasant



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ