* [GIT PULL] RAS urgent for 5.5
@ 2019-11-30 18:46 Borislav Petkov
2019-11-30 23:05 ` pr-tracker-bot
0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2019-11-30 18:46 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Tony Luck, x86-ml, lkml
Hi Linus,
one urgent fix for the thermal throttling machinery: the recent change
reworking the thermal notifications forgot to mask out read-only and
reserved bits in the thermal status MSRs, leading to exceptions while
writing those MSRs. The fix below takes care of masking out those bits
first.
Please pull,
thanks.
---
The following changes since commit c2da5bdc66a377f0b82ee959f19f5a6774706b83:
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2019-11-26 17:12:12 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ras-urgent-for-linus
for you to fetch changes up to 5a43b87b3c62ad149ba6e9d0d3e5c0e5da02a5ca:
x86/mce/therm_throt: Mask out read-only and reserved MSR bits (2019-11-29 09:17:52 +0100)
----------------------------------------------------------------
Srinivas Pandruvada (1):
x86/mce/therm_throt: Mask out read-only and reserved MSR bits
arch/x86/kernel/cpu/mce/therm_throt.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/cpu/mce/therm_throt.c b/arch/x86/kernel/cpu/mce/therm_throt.c
index d01e0da0163a..b38010b541d6 100644
--- a/arch/x86/kernel/cpu/mce/therm_throt.c
+++ b/arch/x86/kernel/cpu/mce/therm_throt.c
@@ -195,17 +195,24 @@ static const struct attribute_group thermal_attr_group = {
#define THERM_THROT_POLL_INTERVAL HZ
#define THERM_STATUS_PROCHOT_LOG BIT(1)
+#define THERM_STATUS_CLEAR_CORE_MASK (BIT(1) | BIT(3) | BIT(5) | BIT(7) | BIT(9) | BIT(11) | BIT(13) | BIT(15))
+#define THERM_STATUS_CLEAR_PKG_MASK (BIT(1) | BIT(3) | BIT(5) | BIT(7) | BIT(9) | BIT(11))
+
static void clear_therm_status_log(int level)
{
int msr;
- u64 msr_val;
+ u64 mask, msr_val;
- if (level == CORE_LEVEL)
- msr = MSR_IA32_THERM_STATUS;
- else
- msr = MSR_IA32_PACKAGE_THERM_STATUS;
+ if (level == CORE_LEVEL) {
+ msr = MSR_IA32_THERM_STATUS;
+ mask = THERM_STATUS_CLEAR_CORE_MASK;
+ } else {
+ msr = MSR_IA32_PACKAGE_THERM_STATUS;
+ mask = THERM_STATUS_CLEAR_PKG_MASK;
+ }
rdmsrl(msr, msr_val);
+ msr_val &= mask;
wrmsrl(msr, msr_val & ~THERM_STATUS_PROCHOT_LOG);
}
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [GIT PULL] RAS urgent for 5.5
2019-11-30 18:46 [GIT PULL] RAS urgent for 5.5 Borislav Petkov
@ 2019-11-30 23:05 ` pr-tracker-bot
0 siblings, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2019-11-30 23:05 UTC (permalink / raw)
To: Borislav Petkov; +Cc: Linus Torvalds, Tony Luck, x86-ml, lkml
The pull request you sent on Sat, 30 Nov 2019 19:46:12 +0100:
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ras-urgent-for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/8fa91bfa9ba4060347c45673f8ee990a2a1d760e
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] RAS urgent for 5.5
2019-12-21 9:23 Borislav Petkov
@ 2019-12-21 14:55 ` pr-tracker-bot
0 siblings, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2019-12-21 14:55 UTC (permalink / raw)
To: Borislav Petkov; +Cc: Linus Torvalds, linux-edac, lkml
The pull request you sent on Sat, 21 Dec 2019 10:23:53 +0100:
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ras-urgent-for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/5c741e2583d2e5a3fc148a5e8a2464bbaa45a1d9
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker
^ permalink raw reply [flat|nested] 4+ messages in thread
* [GIT PULL] RAS urgent for 5.5
@ 2019-12-21 9:23 Borislav Petkov
2019-12-21 14:55 ` pr-tracker-bot
0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2019-12-21 9:23 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-edac, lkml
Hi Linus,
please pull three urgent RAS fixes for the AMD side of things:
- initialize struct mce.bank so that calculated error severity on AMD
SMCA machines is correct
- do not send IPIs early during bank initialization, when interrupts are
disabled
- a fix for when only a subset of MCA banks are enabled, which led to
boot hangs on some new AMD CPUs.
Thx.
---
The following changes since commit e42617b825f8073569da76dc4510bfa019b1c35a:
Linux 5.5-rc1 (2019-12-08 14:57:55 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ras-urgent-for-linus
for you to fetch changes up to a3a57ddad061acc90bef39635caf2b2330ce8f21:
x86/mce: Fix possibly incorrect severity calculation on AMD (2019-12-17 09:39:53 +0100)
----------------------------------------------------------------
Jan H. Schönherr (1):
x86/mce: Fix possibly incorrect severity calculation on AMD
Konstantin Khlebnikov (1):
x86/MCE/AMD: Do not use rdmsr_safe_on_cpu() in smca_configure()
Yazen Ghannam (1):
x86/MCE/AMD: Allow Reserved types to be overwritten in smca_banks[]
arch/x86/kernel/cpu/mce/amd.c | 4 ++--
arch/x86/kernel/cpu/mce/core.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c
index 5167bd2bb6b1..d6cf5c18a7e0 100644
--- a/arch/x86/kernel/cpu/mce/amd.c
+++ b/arch/x86/kernel/cpu/mce/amd.c
@@ -266,10 +266,10 @@ static void smca_configure(unsigned int bank, unsigned int cpu)
smca_set_misc_banks_map(bank, cpu);
/* Return early if this bank was already initialized. */
- if (smca_banks[bank].hwid)
+ if (smca_banks[bank].hwid && smca_banks[bank].hwid->hwid_mcatype != 0)
return;
- if (rdmsr_safe_on_cpu(cpu, MSR_AMD64_SMCA_MCx_IPID(bank), &low, &high)) {
+ if (rdmsr_safe(MSR_AMD64_SMCA_MCx_IPID(bank), &low, &high)) {
pr_warn("Failed to read MCA_IPID for bank %d\n", bank);
return;
}
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 5f42f25bac8f..2e2a421c8528 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -819,8 +819,8 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
if (quirk_no_way_out)
quirk_no_way_out(i, m, regs);
+ m->bank = i;
if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
- m->bank = i;
mce_read_aux(m, i);
*msg = tmp;
return 1;
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-21 14:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-30 18:46 [GIT PULL] RAS urgent for 5.5 Borislav Petkov
2019-11-30 23:05 ` pr-tracker-bot
2019-12-21 9:23 Borislav Petkov
2019-12-21 14:55 ` pr-tracker-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).