From: "Luck, Tony" <tony.luck@intel.com>
To: Borislav Petkov <bp@suse.de>
Cc: Dan Williams <dan.j.williams@intel.com>,
Qiuxu Zhuo <qiuxu.zhuo@intel.com>,
Ashok Raj <ashok.raj@intel.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] x86/mce: Check for alternate indication of machine check recovery on Skylake
Date: Thu, 7 Jun 2018 10:43:37 -0700 [thread overview]
Message-ID: <20180607174337.GA22594@agluck-desk> (raw)
In-Reply-To: <03cbed6e99ddafb51c2eadf9a3b7c8d7a0cc204e.1527283897.git.tony.luck@intel.com>
On Fri, May 25, 2018 at 02:42:09PM -0700, Tony Luck wrote:
> Currently we just check the "CAPID0" register to see whether the CPU
> can recover from machine checks.
>
> But there are also some special SKUs which do not have all advanced
> RAS features, but do enable machine check recovery for use with NVDIMMs.
>
> Add a check for any of bits {8:5} in the "CAPID5" register (each
> reports some NVDIMM mode available, if any of them are set, then
> the system supports memory machine check recovery).
>
> Cc: stable@vger.kernel.org # 4.9
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
Has this stalled somewhere? I'd like to see this one go into the
4.18 merge because it unbreaks some real hardware.
Parts 1 & 2 are nice-to-have, but they just make for better error
messages so aren't as critical.
> arch/x86/kernel/quirks.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
> index 697a4ce04308..736348ead421 100644
> --- a/arch/x86/kernel/quirks.c
> +++ b/arch/x86/kernel/quirks.c
> @@ -645,12 +645,19 @@ static void quirk_intel_brickland_xeon_ras_cap(struct pci_dev *pdev)
> /* Skylake */
> static void quirk_intel_purley_xeon_ras_cap(struct pci_dev *pdev)
> {
> - u32 capid0;
> + u32 capid0, capid5;
>
> pci_read_config_dword(pdev, 0x84, &capid0);
> + pci_read_config_dword(pdev, 0x98, &capid5);
>
> - if ((capid0 & 0xc0) == 0xc0)
> + /*
> + * CAPID0{7:6} indicate whether this is an advanced RAS SKU
> + * CAPID5{8:5} indicate that various NVDIMM usage modes are
> + * enabled, so memory machine check recovery is also enabled.
> + */
> + if ((capid0 & 0xc0) == 0xc0 || (capid5 & 0x1e0))
> static_branch_inc(&mcsafe_key);
> +
> }
> DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x0ec3, quirk_intel_brickland_xeon_ras_cap);
> DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2fc0, quirk_intel_brickland_xeon_ras_cap);
> --
> 2.17.0
>
next prev parent reply other threads:[~2018-06-07 17:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 21:40 [PATCH 0/3] x86/mce fixes Tony Luck
2018-05-25 21:41 ` [PATCH 1/3] x86/mce: Improve error message when kernel cannot recover Tony Luck
2018-06-07 20:24 ` [tip:ras/urgent] " tip-bot for Tony Luck
2018-05-25 21:41 ` [PATCH 2/3] x86/mce: Fix incorrect "Machine check from unknown source" message Tony Luck
2018-05-28 20:49 ` Borislav Petkov
2018-05-29 16:15 ` [PATCH 2/3 V2] " Luck, Tony
2018-05-29 17:41 ` Borislav Petkov
2018-05-29 17:50 ` Luck, Tony
2018-05-29 17:53 ` Borislav Petkov
2018-05-29 18:54 ` Luck, Tony
2018-05-29 20:17 ` Dan Williams
2018-05-30 9:26 ` Borislav Petkov
2018-06-19 10:30 ` Borislav Petkov
2018-05-29 18:22 ` [PATCH 2/3] " Raj, Ashok
2018-05-29 10:42 ` Borislav Petkov
2018-05-29 16:13 ` Luck, Tony
2018-06-22 12:40 ` [tip:ras/core] " tip-bot for Tony Luck
2018-05-25 21:42 ` [PATCH 3/3] x86/mce: Check for alternate indication of machine check recovery on Skylake Tony Luck
2018-06-07 17:43 ` Luck, Tony [this message]
2018-06-07 20:18 ` Dan Williams
2018-06-07 20:24 ` Borislav Petkov
2018-06-07 22:26 ` Luck, Tony
2018-06-14 21:57 ` Luck, Tony
2018-06-15 11:45 ` Borislav Petkov
2018-06-15 16:34 ` Luck, Tony
2018-06-15 17:16 ` Borislav Petkov
2018-06-07 20:24 ` Thomas Gleixner
2018-06-07 20:25 ` [tip:ras/urgent] " tip-bot for Tony Luck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180607174337.GA22594@agluck-desk \
--to=tony.luck@intel.com \
--cc=ashok.raj@intel.com \
--cc=bp@suse.de \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=qiuxu.zhuo@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox