From: Chao Gao <chao.gao@intel.com>
To: Ahmed Abdelfattah <me@ahmedabdelfattah.dev>
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>, <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, <linux-edac@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH] x86/mce/intel: Skip storm tracking on CPUs without CMCI
Date: Fri, 20 Nov 2026 14:54:25 +0800 [thread overview]
Message-ID: <av_uoSlMShJiJsff@intel.com> (raw)
In-Reply-To: <20261119-x86-mce-storm-no-cmci-v1-1-bc593e90abaf@ahmedabdelfattah.dev>
On Thu, Nov 19, 2026 at 08:34:29PM +0200, Ahmed Abdelfattah wrote:
>On an Intel CPU without CMCI (MCG_CAP[10] clear) the MCE timer polls
>every bank, and machine_check_poll() hands each of them to
>mce_track_storm(). That skips a bank only when its poll_only flag is
>set, and only cmci_claim_bank() sets the flag, which never runs when
>cmci_supported() is false.
>
>So a bank that has a corrected error on five polls in a row is taken
>for a CMCI storm, and then:
>
> - mce_intel_handle_storm() reads and writes IA32_MCi_CTL2, which does
> not exist without CMCI, and both accesses fault ("unchecked MSR
> access error: RDMSR from 0x289" and "WRMSR to 0x289").
>
> - When the storm subsides, cmci_storm_end() clears the bank's bit in
> mce_poll_banks. On a CPU with CMCI this hands the bank back to the
> interrupt. Without CMCI nothing sets the bit again, so the CPU never
> polls that bank again and later errors in it are not reported.
>
>KVM guests run into this easily, as QEMU does not offer CMCI.
>
>Mark every bank poll_only when CMCI is not supported. Clear the flag
>in cmci_claim_bank() when CMCI does get enabled on a bank, so that it
>stays right if CMCI is switched on through sysfs after booting with
>mce=no_cmci.
>
>Fixes: 1f68ce2a0272 ("x86/mce: Handle Intel threshold interrupt storms")
>Cc: stable@vger.kernel.org
>Signed-off-by: Ahmed Abdelfattah <me@ahmedabdelfattah.dev>
>---
>This showed up in a KVM guest on QEMU, whose vCPUs don't set
>MCG_CAP.CMCI_P: five corrected errors in one bank on successive polls
>are enough to start a "CMCI storm".
>
>Tested on v7.4-rc3+ (4405c18c95d2) in that guest, with check_interval
>set to 1 s and corrected errors injected into bank 9 through QEMU's
>monitor. Without the patch the fifth error logs "CPU0 BANK9 CMCI storm
My understanding is that QEMU gets host memory errors only through
SIGBUS, and the host kernel does not send SIGBUS for corrected errors.
So QEMU never forwards corrected errors to a guest, and a guest sees
them only when someone injects them by hand.
Can you reproduce this on bare metal, or in a guest without manual injection?
If not, this does not look like a practical issue to me.
prev parent reply other threads:[~2026-11-20 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 18:34 [PATCH] x86/mce/intel: Skip storm tracking on CPUs without CMCI Ahmed Abdelfattah via B4 Relay
2026-11-20 6:54 ` Chao Gao [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=av_uoSlMShJiJsff@intel.com \
--to=chao.gao@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@ahmedabdelfattah.dev \
--cc=mingo@redhat.com \
--cc=stable@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).