summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/rtc.c
diff options
context:
space:
mode:
authorAvadhut Naik <avadhut.naik@amd.com>2024-10-22 19:36:27 +0000
committerBorislav Petkov (AMD) <bp@alien8.de>2024-10-30 17:18:59 +0100
commit750fd23926f1507cc826b5a4fdd4bfc7283e7723 (patch)
treedf9b035e01d6f501e4eef7a66d2be0c03a122583 /arch/x86/kernel/rtc.c
parent754269ccf03d68da15b9e5cdd26a6464b81cec67 (diff)
x86/mce: Add wrapper for struct mce to export vendor specific info
Currently, exporting new additional machine check error information involves adding new fields for the same at the end of the struct mce. This additional information can then be consumed through mcelog or tracepoint. However, as new MSRs are being added (and will be added in the future) by CPU vendors on their newer CPUs with additional machine check error information to be exported, the size of struct mce will balloon on some CPUs, unnecessarily, since those fields are vendor-specific. Moreover, different CPU vendors may export the additional information in varying sizes. The problem particularly intensifies since struct mce is exposed to userspace as part of UAPI. It's bloating through vendor-specific data should be avoided to limit the information being sent out to userspace. Add a new structure mce_hw_err to wrap the existing struct mce. The same will prevent its ballooning since vendor-specifc data, if any, can now be exported through a union within the wrapper structure and through __dynamic_array in mce_record tracepoint. Furthermore, new internal kernel fields can be added to the wrapper struct without impacting the user space API. [ bp: Restore reverse x-mas tree order of function vars declarations. ] Suggested-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Link: https://lore.kernel.org/r/20241022194158.110073-2-avadhut.naik@amd.com
Diffstat (limited to 'arch/x86/kernel/rtc.c')
0 files changed, 0 insertions, 0 deletions