]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu/amd: Use maximum PPR log buffer size when SNP is enabled on Family 0x19
authorVasant Hegde <vasant.hegde@amd.com>
Mon, 20 Apr 2026 08:42:04 +0000 (08:42 +0000)
committerJoerg Roedel <joerg.roedel@amd.com>
Mon, 27 Apr 2026 11:49:36 +0000 (13:49 +0200)
commit1f44aab79bac31f459422dfb213e907bb386509c
tree981d5d12d84df7c595cdb8b4faeee7d99bc7963c
parent58c0ac6125d89bf6ec65a521eaeb52a0e8e20a9f
iommu/amd: Use maximum PPR log buffer size when SNP is enabled on Family 0x19

Due to CVE-2023-20585, the PPR log buffer must use the maximum supported
size (512K) on Genoa (Family 0x19, model >= 0x10) systems when SNP is
enabled, to mitigate a potential security vulnerability. Note that Family
0x19 models below 0x10 (Milan) do not support PPR when SNP is enabled.
Hence the PPR log size increase is only applied for model >= 0x10.
All other systems continue to use the default PPR log buffer size (8K).

Apply the errata fix by making the following changes:

- Introduce global new variable (amd_iommu_pprlog_size) to have PPR log buffer
  size. Adjust variable size for Genoa family.

- Extend 'amd_iommu_apply_erratum_snp()' to also set the PPR log buffer
  size to maximum for Family 0x19 model >= 0x10 when SNP is enabled.

- Rename PPR_* macros to make it more readable.

Link: https://www.amd.com/en/resources/product-security/bulletin/amd-sb-3016.html
Cc: Borislav Petkov <bp@alien8.de>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Tested-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/amd/amd_iommu.h
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/init.c
drivers/iommu/amd/ppr.c