public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: "“William Roche" <william.roche@oracle.com>
Cc: tony.luck@intel.com, bp@alien8.de, tglx@kernel.org,
	mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org,
	hpa@zytor.com, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org, John.Allen@amd.com,
	jane.chu@oracle.com
Subject: Re: [PATCH v1 1/1] x86/mce: AMD deferred error handling crashes Qemu VMs
Date: Tue, 17 Feb 2026 10:24:23 -0500	[thread overview]
Message-ID: <20260217152423.GA617258@yaz-khff2.amd.com> (raw)
In-Reply-To: <20260213182630.680651-2-william.roche@oracle.com>

On Fri, Feb 13, 2026 at 06:26:30PM +0000, “William Roche wrote:
> From: William Roche <william.roche@oracle.com>
> 

Hi William, I agree with the fix, and feedback is mostly around
style/convention.

Use "x86/mce/amd" as the $SUBJECT prefix.

Subject should be imperative.

Ex. "x86/mce/amd: Fix VM crash during deferred error handling"

> A non Scalable MCA system may prevent access to SMCA specific registers
> like MCA_DESTAT. This is the case of Qemu/kvm VMs, and the VM kernel

I expect that QEMU and KVM should be capitalized.

> needs to avoid accessing SMCA registers on non-SMCA platforms.
> 

The commit message should include an imperative statement.

Ex. "Check for the SMCA feature before accessing MCA_DESTAT."

> Fixes: 7cb735d7c0cb ("x86/mce: Unify AMD DFR handler with MCA Polling")
> Cc: stable@vger.kernel.org
> Signed-off-by: William Roche <william.roche@oracle.com>

"CC stable" tag should go after Signed-off-by.

> ---
>  arch/x86/kernel/cpu/mce/amd.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c
> index 3f1dda355307..53c4b032ad35 100644
> --- a/arch/x86/kernel/cpu/mce/amd.c
> +++ b/arch/x86/kernel/cpu/mce/amd.c
> @@ -875,14 +875,18 @@ void amd_clear_bank(struct mce *m)
>  {
>  	amd_reset_thr_limit(m->bank);
>  
> -	/* Clear MCA_DESTAT for all deferred errors even those logged in MCA_STATUS. */
> -	if (m->status & MCI_STATUS_DEFERRED)
> -		mce_wrmsrq(MSR_AMD64_SMCA_MCx_DESTAT(m->bank), 0);
> -
> -	/* Don't clear MCA_STATUS if MCA_DESTAT was used exclusively. */
> -	if (m->kflags & MCE_CHECK_DFR_REGS)
> -		return;
> +	if (mce_flags.smca) {
> +		/*
> +		 * Clear MCA_DESTAT for all deferred errors even those
> +		 * logged in MCA_STATUS.
> +		 */
> +		if (m->status & MCI_STATUS_DEFERRED)
> +			mce_wrmsrq(MSR_AMD64_SMCA_MCx_DESTAT(m->bank), 0);
>  
> +		/* Don't clear MCA_STATUS if MCA_DESTAT was used exclusively. */
> +		if (m->kflags & MCE_CHECK_DFR_REGS)
> +			return;
> +	}

Please include a newline here.

>  	mce_wrmsrq(mca_msr_reg(m->bank, MCA_STATUS), 0);
>  }
>  

Otherwise, looks good to me.

Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>

Thanks,
Yazen

      reply	other threads:[~2026-02-17 15:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-13 18:26 [PATCH v1 0/1] AMD VM crashing on deferred memory error injection “William Roche
2026-02-13 18:26 ` [PATCH v1 1/1] x86/mce: AMD deferred error handling crashes Qemu VMs “William Roche
2026-02-17 15:24   ` 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=20260217152423.GA617258@yaz-khff2.amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=John.Allen@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jane.chu@oracle.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=william.roche@oracle.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