From: sashiko-bot@kernel.org
To: "Andreas Grapentin" <gra@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
linux-perf-users@vger.kernel.org,
"Heiko Carstens" <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH 09/10] KVM: s390: arm64: Enable mcck forwarding
Date: Fri, 04 Dec 2026 12:33:55 +0000 [thread overview]
Message-ID: <sashiko-outbox-249804@kernel.org> (raw)
In-Reply-To: <20261204-host-irq-v1-9-a8387ee8a380@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] KVM: s390: arm64: fatal SError injected for non-fatal s390
machine checks
- [Low] KVM: s390: arm64: mci_to_esr() encodes AET_UEU instead of AET_UC
--
commit ed3b42734c8b960c56a23fa774b7d0e1c9dc90bc
Author: Steffen Eiden <seiden@linux.ibm.com>
KVM: s390: arm64: Enable mcck forwarding
This commit registers the KVM machine check backup callback for arm64
guests on s390 and reinjects saved machine checks as virtual SError
exceptions before resuming the guest.
> diff --git a/arch/s390/kvm/arm64/arm.c b/arch/s390/kvm/arm64/arm.c
> index 49e2ffcfdf22f..22ed1109f7b8f 100644
> --- a/arch/s390/kvm/arm64/arm.c
> +++ b/arch/s390/kvm/arm64/arm.c
[ ... ]
> @@ -433,6 +436,42 @@ static noinstr void kvm_sae_exit_handler(unsigned long v)
[ ... ]
> +static u64 mci_to_esr(union mci mci)
> +{
> + /* for now, as a reasonable approximation, consider any host
> + * machine check during arm64 guest execution a fatal uncontainable
> + * event for the arm64 guest.
> + */
> + return ESR_ELx_AET_UEU | ESR_ELx_FSC_SERROR;
> +}
[Severity: Low]
Should this return ESR_ELx_AET_UC instead of ESR_ELx_AET_UEU?
The comment describes an uncontainable event, and forwarded machine checks
can leave guest state corrupted without verifying containment, but
ESR_ELx_AET_UEU encodes a contained Unrecoverable error while
ESR_ELx_AET_UC encodes Uncontainable.
Linux arm64 guests currently panic on both, but a RAS-compliant guest OS
or firmware that distinguishes the two could assume the error was
contained.
> +
> +static void reinject_mcck(struct kvm_vcpu *vcpu)
> +{
> + struct mcck_volatile_info *mcck;
> + union mci mci;
> + u64 esr;
> +
> + mcck = &vcpu->arch.mcck_info;
> + mci.val = mcck->mcic;
> +
> + if (!mcck->mcic)
> + return;
> +
> + esr = mci_to_esr(mci);
> +
> + memset(mcck, 0, sizeof(*mcck));
> +
> + kvm_inject_serror_esr(vcpu, esr);
> +}
[Severity: Medium]
Can this inject a fatal SError into a healthy arm64 guest on a non-fatal
s390 machine check?
machine_check_init() enables recovery (mci.sr, mci.sc, mci.ds) and
warning (mci.w) subclasses in CR14, and s390_do_machine_check() backs up
every subclass outside MCCK_CODE_NO_GUEST via sae_backup_mci().
When an ECC-corrected storage error or power/thermal warning fires during
sae(), reinject_mcck() sees a non-zero mcic and injects a fatal SError
via mci_to_esr(). An arm64 Linux guest treats that SError as fatal in
arm64_is_fatal_ras_serror() and panics via arm64_serror_panic().
Should reinject_mcck() filter out host warnings and already-corrected or
hardware-recovered conditions before injecting an SError?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-host-irq-v1-0-a8387ee8a380@linux.ibm.com?part=9
next prev parent reply other threads:[~2026-12-04 12:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 12:09 [PATCH 00/10] s390: Host interrupt handling for SAE guests Andreas Grapentin
2026-12-04 12:09 ` [PATCH 01/10] s390/sae: Prepare handling host interrupts during SAE execution Andreas Grapentin
2026-12-04 12:31 ` sashiko-bot
2026-12-04 12:09 ` [PATCH 02/10] s390/sae: Add sae_entry and sae_exit symbols Andreas Grapentin
2026-12-04 12:30 ` sashiko-bot
2026-12-04 12:09 ` [PATCH 03/10] KVM: s390: Share mcck_volatile_info between KVMs Andreas Grapentin
2026-12-04 12:09 ` [PATCH 04/10] s390/irq: Add kvm_exit callback for arm-on-s390 Andreas Grapentin
2026-12-04 12:40 ` sashiko-bot
2026-12-04 12:09 ` [PATCH 05/10] KVM: s390: arm64: Enable host irq Andreas Grapentin
2026-12-04 12:35 ` sashiko-bot
2026-12-04 12:09 ` [PATCH 06/10] s390: Rename CIF_MCCK_GUEST to CIF_MCCK_SIE Andreas Grapentin
2026-12-04 12:09 ` [PATCH 07/10] s390/nmi: Handle MCCKs for SAE guests Andreas Grapentin
2026-12-04 12:40 ` sashiko-bot
2026-12-04 12:09 ` [PATCH 08/10] KVM: s390: arm64: Enable SError injection Andreas Grapentin
2026-12-04 12:34 ` sashiko-bot
2026-12-04 12:09 ` [PATCH 09/10] KVM: s390: arm64: Enable mcck forwarding Andreas Grapentin
2026-12-04 12:33 ` sashiko-bot [this message]
2026-12-04 12:09 ` [PATCH 10/10] s390/perf: Recognize SAE guests Andreas Grapentin
2026-12-04 12:30 ` sashiko-bot
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=sashiko-outbox-249804@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=gra@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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