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: <f1b0721c-b518-4bf6-9de9-f09369b85d0c@amd.com>
Date: Wed, 19 Mar 2025 22:20:54 +0530
From: Vasant Hegde <vasant.hegde@....com>
To: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@....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

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 ?

-Vasant


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ