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: <d1e56da5-8049-4db7-97b8-05a9e7e7bbda@amd.com>
Date: Tue, 8 Apr 2025 11:11:46 +0530
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@....com>
To: Vasant Hegde <vasant.hegde@....com>, joro@...tes.org, will@...nel.org,
 robin.murphy@....com, linux-kernel@...r.kernel.org, iommu@...ts.linux.dev
Cc: suravee.suthikulpanit@....com
Subject: Re: [PATCH v4 2/8] iommu/amd: Add debugfs support to dump IOMMU MMIO
 registers

Hi Vasant,

On 3/19/2025 10:20 PM, Vasant Hegde wrote:
> Dheeraj,
> 
> 
> On 3/17/2025 5:28 PM, Dheeraj Kumar Srivastava wrote:
>> Analyzing IOMMU MMIO registers gives a view of what IOMMU is
>> configured with on the system and is helpful to debug issues
>> with IOMMU.
>>
>> eg.
>> -> To get mmio registers value at offset 0x18 for iommu<x> (say, iommu00)
>>     # echo "0x18" > /sys/kernel/debug/iommu/amd/iommu00/mmio
>>     # cat /sys/kernel/debug/iommu/amd/iommu00/mmio
>>
>> Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@....com>
>> ---
>>   drivers/iommu/amd/debugfs.c | 47 +++++++++++++++++++++++++++++++++++++
>>   1 file changed, 47 insertions(+)
>>
>> diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c
>> index ff9520e002be..c61d52420c5f 100644
>> --- a/drivers/iommu/amd/debugfs.c
>> +++ b/drivers/iommu/amd/debugfs.c
>> @@ -15,6 +15,50 @@
>>   static struct dentry *amd_iommu_debugfs;
>>   
>>   #define	MAX_NAME_LEN	20
>> +#define	OFS_IN_SZ	8
>> +
>> +static int mmio_offset = -1;
> 
> 
> Somehow I missed to catch this earlier. Here you have global variable but mmio
> is defined per IOMMU. Shouldn't we track it per IOMMU ?

Yes correct we need to maintain per iommu global variables for mmio and 
capability registers offset. I have sent v5 addressing this. Please find 
some time to review it.

Thanks
Dheeraj

> 
> -Vasant
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ