From: Yazen Ghannam <yazen.ghannam@amd.com>
To: OptoCloud <git@optocloud.no>
Cc: Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Avadhut Naik <avadhut.naik@amd.com>,
Qiuxu Zhuo <qiuxu.zhuo@intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] x86/mce: Reset MCA_SYND between bank scans
Date: Wed, 23 Sep 2026 16:06:48 -0400 [thread overview]
Message-ID: <20260923200648.GB1080284@yaz-khff2.amd.com> (raw)
In-Reply-To: <zmLt5S3aLNcgxhqRI7yuVhN-gNY-W2KFuNz9F9gU4jvyJuY4LGM41p4WuEVus3-_3fs8B9sMA0143PG2urpBRYKlSCxuUQxV401F6USx4DA=@optocloud.no>
On Mon, Sep 21, 2026 at 01:37:02PM +0000, OptoCloud wrote:
> From: Eirik Bøe <git@optocloud.no>
>
> machine_check_poll() and __mc_scan_banks() both reuse a single
> struct mce_hw_err while iterating over the MCA banks. The record is
> zeroed once before the loop. Each iteration then resets only MISC
> and ADDR.
>
> On SMCA, mce_read_aux() writes SYND only when MCI_STATUS_SYNDV is
> set. Nothing clears it again, so a bank that does not set SYNDV
> inherits the SYND value read for the previous bank in the same
> scan, and that stale value is printed and handed to the decoders as
> if it belonged to the current error.
>
> Decoders are expected to ignore MCA_SYND when SYNDV is clear, so
> the stale value is cosmetic.
>
> Reset SYND at the start of each iteration in both loops, alongside
> the existing MISC and ADDR resets.
>
> Found by code inspection; not reproduced on hardware.
>
> Fixes: db819d60f672 ("x86/mce: Add support for new MCA_SYND register")
> Signed-off-by: Eirik Bøe <git@optocloud.no>
> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
>
> Notes (amlog):
> No v2 of this patch was sent. The numbering follows the series.
>
> Changes since v1:
> - Dropped Cc: stable (Yazen)
> - Picked up Yazen's Reviewed-by
>
> arch/x86/kernel/cpu/mce/core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
> index ab469605fc89..16183fa4ddc7 100644
> --- a/arch/x86/kernel/cpu/mce/core.c
> +++ b/arch/x86/kernel/cpu/mce/core.c
> @@ -808,6 +808,7 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
>
> m->misc = 0;
> m->addr = 0;
> + m->synd = 0;
> m->bank = i;
>
> barrier();
> @@ -1347,6 +1348,7 @@ __mc_scan_banks(struct mce_hw_err *err, struct pt_regs *regs,
>
> m->misc = 0;
> m->addr = 0;
> + m->synd = 0;
> m->bank = i;
>
> m->status = mce_rdmsrq(mca_msr_reg(i, MCA_STATUS));
> --
Hi Eirik,
This patch can be dropped. It isn't necessary with the update to patch
2.
Also, please adjust your email settings to keep all patches within a
revision as a single email thread.
Thanks,
Yazen
prev parent reply other threads:[~2026-09-23 20:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 13:37 OptoCloud
2026-09-23 20:06 ` Yazen Ghannam [this message]
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=20260923200648.GB1080284@yaz-khff2.amd.com \
--to=yazen.ghannam@amd.com \
--cc=avadhut.naik@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=git@optocloud.no \
--cc=hpa@zytor.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=qiuxu.zhuo@intel.com \
--cc=tglx@kernel.org \
--cc=tony.luck@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
all inboxes | Powered by JetHome®