- Fix confusing output from /sys/kernel/debug/ras/daemon_active
- Add another MCE severity error case to the Intel error severity table to promote UC and AR errors to panic severity and remove the corresponding code condition doing that. - Make sure the thresholding and deferred error interrupts on AMD SMCA systems clear the all registers reporting an error so that there are no multiple errors logged for the same event -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmOXiPcACgkQEsHwGGHe VUomHQ/9Gj6Go0ILvIEpn3VCC8bRc0nf/SFJ+4BnFBc+GdiN6ePhDwn1of3bPk/d zNuPFGEa1rV7r97MDsggGetvNVVrA6zumoPmLrHPrZSvhRyCW620J43RH+3T4bzz XfCMU6oRJg+F4dFUPnnAnp/6DTwLSe0ofpc2eARlmjdOxTo4MRfxWfwe5XALGGN1 q+8ycB3Gb8cvhjlB61PL7hhjuy6yH29v63vjUMqsyfDmVhXRxY3xymg+4SxalCBf 0Zz8/RRJFHSOwzUPsQUm9kVMN8phhJ/fN0B1wsLDWlt0K5Vx5D19l+wbH4aaTTcF 8bWMMmS43raFuARkcROAEbDrWM2kEo5Qe9eWhZ7HB9wLG9SicJfZIH5Th4ul40V8 4RARSj1ve4vfxzNmmhFf+RL8kdYWLpxlwVJUhdHkiqKTqN8SIQMb/dsNg/7KjFsV N3PSZ0lOEQ5Q2l5fSZoL+auqXgJBD5BUy+Gjk0awZavzZCdI35/LK8xVzrgCgsRk AlAcfvngpyZB7A0aeiwalIszcyjk1cnK8+RwIRtvM0CAYhKP+SVTvq4wHtRiO5HD TfuVgaHSgOyoOD0NdUGM6PXgrBXqnyIYI2me8Gwtg7gzenizBsv/uh8cvWa3DQnG 5NItCYEG7Paa7p3VQDvFqxKldIC1Bjwi2pYYIDOgRiwWGbYzSCU= =sKP5 -----END PGP SIGNATURE----- Merge tag 'ras_core_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS updates from Borislav Petkov: - Fix confusing output from /sys/kernel/debug/ras/daemon_active - Add another MCE severity error case to the Intel error severity table to promote UC and AR errors to panic severity and remove the corresponding code condition doing that. - Make sure the thresholding and deferred error interrupts on AMD SMCA systems clear the all registers reporting an error so that there are no multiple errors logged for the same event * tag 'ras_core_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: RAS: Fix return value from show_trace() x86/mce: Use severity table to handle uncorrected errors in kernel x86/MCE/AMD: Clear DFR errors found in THR handler
This commit is contained in:
commit
9196a0ba9f
@ -788,6 +788,24 @@ _log_error_bank(unsigned int bank, u32 msr_stat, u32 msr_addr, u64 misc)
|
||||
return status & MCI_STATUS_DEFERRED;
|
||||
}
|
||||
|
||||
static bool _log_error_deferred(unsigned int bank, u32 misc)
|
||||
{
|
||||
if (!_log_error_bank(bank, mca_msr_reg(bank, MCA_STATUS),
|
||||
mca_msr_reg(bank, MCA_ADDR), misc))
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Non-SMCA systems don't have MCA_DESTAT/MCA_DEADDR registers.
|
||||
* Return true here to avoid accessing these registers.
|
||||
*/
|
||||
if (!mce_flags.smca)
|
||||
return true;
|
||||
|
||||
/* Clear MCA_DESTAT if the deferred error was logged from MCA_STATUS. */
|
||||
wrmsrl(MSR_AMD64_SMCA_MCx_DESTAT(bank), 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* We have three scenarios for checking for Deferred errors:
|
||||
*
|
||||
@ -799,20 +817,9 @@ _log_error_bank(unsigned int bank, u32 msr_stat, u32 msr_addr, u64 misc)
|
||||
*/
|
||||
static void log_error_deferred(unsigned int bank)
|
||||
{
|
||||
bool defrd;
|
||||
|
||||
defrd = _log_error_bank(bank, mca_msr_reg(bank, MCA_STATUS),
|
||||
mca_msr_reg(bank, MCA_ADDR), 0);
|
||||
|
||||
if (!mce_flags.smca)
|
||||
if (_log_error_deferred(bank, 0))
|
||||
return;
|
||||
|
||||
/* Clear MCA_DESTAT if we logged the deferred error from MCA_STATUS. */
|
||||
if (defrd) {
|
||||
wrmsrl(MSR_AMD64_SMCA_MCx_DESTAT(bank), 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Only deferred errors are logged in MCA_DE{STAT,ADDR} so just check
|
||||
* for a valid error.
|
||||
@ -832,7 +839,7 @@ static void amd_deferred_error_interrupt(void)
|
||||
|
||||
static void log_error_thresholding(unsigned int bank, u64 misc)
|
||||
{
|
||||
_log_error_bank(bank, mca_msr_reg(bank, MCA_STATUS), mca_msr_reg(bank, MCA_ADDR), misc);
|
||||
_log_error_deferred(bank, misc);
|
||||
}
|
||||
|
||||
static void log_and_reset_block(struct threshold_block *block)
|
||||
|
@ -202,6 +202,11 @@ static struct severity {
|
||||
PANIC, "Overflowed uncorrected",
|
||||
BITSET(MCI_STATUS_OVER|MCI_STATUS_UC)
|
||||
),
|
||||
MCESEV(
|
||||
PANIC, "Uncorrected in kernel",
|
||||
BITSET(MCI_STATUS_UC),
|
||||
KERNEL
|
||||
),
|
||||
MCESEV(
|
||||
UC, "Uncorrected",
|
||||
BITSET(MCI_STATUS_UC)
|
||||
@ -391,9 +396,6 @@ static noinstr int mce_severity_intel(struct mce *m, struct pt_regs *regs, char
|
||||
*msg = s->msg;
|
||||
s->covered = 1;
|
||||
|
||||
if (s->sev >= MCE_UC_SEVERITY && ctx == IN_KERNEL)
|
||||
return MCE_PANIC_SEVERITY;
|
||||
|
||||
return s->sev;
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ EXPORT_SYMBOL_GPL(ras_userspace_consumers);
|
||||
|
||||
static int trace_show(struct seq_file *m, void *v)
|
||||
{
|
||||
return atomic_read(&trace_count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int trace_open(struct inode *inode, struct file *file)
|
||||
|
Loading…
Reference in New Issue
Block a user