mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: William Roche <william.roche@oracle.com>
To: Borislav Petkov <bp@alien8.de>
Cc: yazen.ghannam@amd.com, tony.luck@intel.com, 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 v3 1/1] x86/mce/amd: Guard SMCA DESTAT access on non-SMCA machines
Date: Tue, 17 Mar 2026 14:38:58 +0100	[thread overview]
Message-ID: <1c7f33c5-b1f2-4af3-ae82-37723a89cc96@oracle.com> (raw)
In-Reply-To: <20260317133247.GAablX_1ECCF-CKgjJ@fat_crate.local>

On 3/17/26 14:32, Borislav Petkov wrote:
> On Tue, Mar 17, 2026 at 10:38:10AM +0000, “William Roche wrote:
>> From: William Roche <william.roche@oracle.com>
>>
>> Access to SMCA specific registers like MCA_DESTAT should only be done
>> after having checked the smca bit. Avoiding a non-SMCA machine (like
>> AMD QEMU/KVM VMs) crash during deferred error handling.
> 
> Not good enough. I rewrote it to:
> 
> Author: William Roche <william.roche@oracle.com>
> Date:   Tue Mar 17 10:38:10 2026 +0000
>   
>      x86/mce/amd: Check SMCA feature bit before accessing SMCA MSRs
>      
>      People do effort to inject MCEs into guests in order to simulate/test handling
>      of real hardware errors. These efforts are of a questionable nature because,
>      for one, a guest cannot really make any assumptions about the underlying
>      machine and especially which MSR accesses the hypervisor filters and
>      which it doesn't. See Link tag for the whole background.
>      
>      However, regardless of virtualization or not, access to SMCA-specific
>      registers like MCA_DESTAT should only be done after having checked the smca
>      feature bit. And there are AMD machines like Bulldozer (the one before Zen1)
>      which do support deferred errors but are not SMCA machines.
>      
>      Therefore, properly check the feature bit before accessing related MSRs.
>      
>        [ bp: Rewrite commit message. ]
>      
>      Fixes: 7cb735d7c0cb ("x86/mce: Unify AMD DFR handler with MCA Polling")
>      Signed-off-by: William Roche <william.roche@oracle.com>
>      Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
>      Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
>      Cc: stable@vger.kernel.org
>      Link: https://lore.kernel.org/r/20260218163025.1316501-1-william.roche@oracle.com

Thank you.

William.



  reply	other threads:[~2026-03-17 13:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 10:38 [PATCH v3 0/1] AMD VM crashing on deferred memory error injection “William Roche
2026-03-17 10:38 ` [PATCH v3 1/1] x86/mce/amd: Guard SMCA DESTAT access on non-SMCA machines “William Roche
2026-03-17 13:32   ` Borislav Petkov
2026-03-17 13:38     ` William Roche [this message]
2026-03-17 18:17       ` Borislav Petkov
2026-03-17 20:06         ` William Roche
2026-03-17 20:24           ` Borislav Petkov
2026-03-17 21:52             ` William Roche
2026-03-18 20:24               ` Borislav Petkov

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=1c7f33c5-b1f2-4af3-ae82-37723a89cc96@oracle.com \
    --to=william.roche@oracle.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=x86@kernel.org \
    --cc=yazen.ghannam@amd.com \
    /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®