summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorVasant Hegde <vasant.hegde@amd.com>2026-04-20 11:42:03 +0300
committerJoerg Roedel <joerg.roedel@amd.com>2026-04-27 14:49:16 +0300
commit58c0ac6125d89bf6ec65a521eaeb52a0e8e20a9f (patch)
tree5d84ddd63bd54046884a0a1b7b358da126258cb6 /include/linux
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
downloadlinux-58c0ac6125d89bf6ec65a521eaeb52a0e8e20a9f.tar.xz
iommu/amd: Use maximum Event log buffer size when SNP is enabled on Family 0x19
Due to CVE-2023-20585, the Event log buffer must use the maximum supported size (512K) on Milan/Genoa (Family 0x19) systems when SNP is enabled, to mitigate a potential security vulnerability. All other systems continue to use the default Event log buffer size (8K). Apply the errata fix by making the following changes: * Introduce new global variable (amd_iommu_evtlog_size) to have event log buffer size. Adjust variable size for family 0x19. * Since 'iommu_snp_enable()' must be called after the core IOMMU subsystem is initialized, it cannot be moved to the early init stage. The SNP errata must also be applied after the 'iommu_snp_enable()' check. Therefore, 'alloc_event_buffer()' and 'iommu_enable_event_buffer()' are now called in the IOMMU_ENABLED state, after the errata is applied. * Adjust alloc_event_buffer() and iommu_enable_event_buffer() to handle all IOMMU instances. * Also rename EVT_* 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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions