Skip to content

Backport AMD Venice MCA new bank type support to veLinux kernel 6.6 - #145

Open
mohanasv2 wants to merge 5 commits into
openvelinux:6.6-velinuxfrom
mohanasv2:Venice_MCA_new_bank_types_support
Open

mohanasv2 wants to merge 5 commits into
openvelinux:6.6-velinuxfrom
mohanasv2:Venice_MCA_new_bank_types_support

Conversation

@mohanasv2

@mohanasv2 mohanasv2 commented Sep 9, 2026

Copy link
Copy Markdown

Backport AMD Venice MCA new bank type support to veLinux kernel 6.6

Patch series

  1. x86/mce/amd, EDAC/mce_amd: Move long names to decoder module
  2. x86/MCE/AMD: Add new MA_LLC, USR_DP, and USR_CP bank types
  3. x86/mce, EDAC/mce_amd: Reorder SMCA bank type enums
  4. x86/mce, EDAC/mce_amd: Update CS bank type naming
  5. x86/mce, EDAC/mce_amd: Add new SMCA bank types

Overall summary
This 5-patch series refactors and extends AMD SMCA bank type handling in the x86 MCE and EDAC subsystems. It moves long bank names into the decoder module, reorganizes SMCA bank type enums, and updates existing CS bank naming for better consistency with AMD documentation. The series also introduces support for new bank types such as MA_LLC, USR_DP, and USR_CP, along with additional SMCA bank definitions. Overall, the changes improve code maintainability, align the kernel with newer AMD hardware specifications, and enhance error decoding support for recent AMD processors.

Functional tests:
Kernel Configuration: The kernel was built with the following options enabled:
CONFIG_X86_MCE=y
CONFIG_X86_MCE_AMD=y
CONFIG_X86_MCE_INJECT=m
CONFIG_EDAC=y
CONFIG_EDAC_DECODE_MCE=m
CONFIG_EDAC_AMD64=m
CONFIG_AMD_ATL=m
CONFIG_AMD_NB=y

  1. MCA / SMCA sanity

    • Verified CPU model and MCA bank count via /proc/cpuinfo and /sys/devices/system/machinecheck/machinecheck0/bank*.
    • Confirmed that the hardware exposes SMCA bank types that the unpatched OLK-6.6 kernel does not decode.
  2. New SMCA bank type decoding

    • Used mce-inject to inject correctable errors into the newly added SMCA banks.
    • On the unpatched kernel, the relevant (HWID, McaType) pairs are missing from the SMCA table, so decode_smca_error() prints no bank name.
    • With the backported patches, the same injections produce decoded bank names and unit descriptions matching upstream for the new SMCA banks (including the die-to-die interconnect and new data cache controller units).
  3. CS bank rename (user-visible ABI change)

    • Checked the sysfs MCA bank names:
      Before backport: coherent_slave_*
      After backport: coherent_station_*
    • Used mce-inject on the CS bank and confirmed that the decoded error text changes only in the unit name:
      Before: "Coherent Slave Ext. Error Code: ..."
      After: "Coherent Station Ext. Error Code: ..." while the underlying error information remains unchanged.
  4. Regression checks for existing bank types

    • Injected errors into existing SMCA banks that are not renamed (e.g. UMC, LS).
    • Confirmed that the decoded dmesg output and EDAC logging are identical before and after the backport, despite the Enum reordering.
  5. Long-name table validation

    • Verified that the long-name strings for the newly added SMCA bank types (die-to-die interconnect and DACC front-end/back-end units) are present in the built edac_mce_amd module and vmlinux image and used by the decoder.
  6. Kernel stability

    • Booted kernels before and after the backport on the test platform.
    • Ran MCA injection tests and basic workload smoke tests.
    • Confirmed dmesg contains no BUG, Oops, panic, or WARNING entries related to MCE/EDAC on either kernel; only the usual Spectre v2 advisory about unprivileged eBPF appears on both builds.

yghannam and others added 5 commits September 9, 2026 10:14
commit ff03ff3 upstream.

The long names of the SMCA banks are only used by the MCE decoder
module.

Move them out of the arch code and into the decoder module.

  [ bp: Name the long names array "smca_long_names", drop local ptr in
    decode_smca_error(), constify arrays. ]

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231118193248.1296798-5-yazen.ghannam@amd.com
Signed-off-by: priyanka-mani <DMani.Priyanka@amd.com>
Signed-off-by: mohanasv2 <mohanasv@amd.com>
commit 47b744e upstream.

Add HWID and McaType values for new SMCA bank types.

Signed-off-by: Muralidhara M K <muralidhara.mk@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231102114225.2006878-3-muralimk@amd.com
Signed-off-by: priyanka-mani <DMani.Priyanka@amd.com>
Signed-off-by: mohanasv2 <mohanasv@amd.com>
commit bee9f4178b4a3fec70414c82ddc4bceff182f2ba upstream.

Originally, the SMCA bank type enums were ordered based on processor
documentation. However, the ordering became inconsistent after new bank
types were added over time.

Sort the bank type enums alphanumerically in most places.  Sort the
"enum to HWID/McaType" mapping by HWID/McaType. Drop redundant code
comments.

No functional changes.

  [ bp: Sort them alphanumerically. ]

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260307163316.345923-2-yazen.ghannam@amd.com
Signed-off-by: priyanka-mani <DMani.Priyanka@amd.com>
Signed-off-by: mohanasv2 <mohanasv@amd.com>
commit b595a009726b706fdadedace90c54831e19188e2 upstream.

Recent documentation updated the "CS" bank type name from "Coherent
Slave" to "Coherent Station".

Apply this change in the kernel also.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260307163316.345923-3-yazen.ghannam@amd.com
Signed-off-by: priyanka-mani <DMani.Priyanka@amd.com>
Signed-off-by: mohanasv2 <mohanasv@amd.com>
commit b90d398138ab3088d168cacb2c3d5248feaa1ef7 upstream.

Recognize new SMCA bank types and include their short names for sysfs
and long names for decoding.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260307163316.345923-4-yazen.ghannam@amd.com
Signed-off-by: priyanka-mani <DMani.Priyanka@amd.com>
Signed-off-by: mohanasv2 <mohanasv@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants