From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387636; b=x8ZfCAU+54BzTbIFinzwpWhZ+BodXwaJUz8LxqxWbz+mkgsOBfSYOZW09OjcUmLIdxKP /cn5WjYv4T6JSvK6bOUL2M5kgsjzO+Jt1s0rlh8XXtzEutRgFI1N2ZlebN6gd9CIFGkvJ ZbgKWbeYxRV6gK+hK7Jiig55upPiQMmxpqR81XiQ8i0h/eR01R2ikiL2n2wZUuMjpDRvG fBiKjHhxJcb5d4RA9+8ZyA23fBwwqE1QTFgWTpxe5y/wujT5Kr5QHrBeKF86q0LYtu64z Rs37lORDDrKrKdnWqO0OpDyVZ4D60wPwdq3xbkjL+22ppD74/rhYkKfYZMEFiXVhUVg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387636; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=AsAZC0GDo55ZW3Zoc7S6HO84M7bhTbch/PI2SS44cVA=; b=V+CYC53nP7b5rO7jjR3mE1ZLm7tng8PfDI1DqDwKQaVjDTB8KNuL0Nq3VAH3KhB4hvG5 cQY5/f+ph7qdgNX7pxagDaaLLCHeNCBYbUW0sqGstJemwVUjcgO2yDeSVe72I7Y1O0oxy 6D5yWmI7rH6FJqMIB1mJPfhPHcwvKLagvkUmSBfY+S+ccRihp42oU4c8/6pG/mriunKgq YEZWSsgVg6E+MegnY+D5lIC+3GLbgOYZURT7wKNsc/++JiOYhyLtBZ8g0HiNYtaE62mzG VqwIUMn8d6P+3xgLIqrZDYsV86xeC0kL03EmVZMvwZDk3xgoGzG8zIRX8MI+SM+1Z4A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XRCFOP01; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45693606A322; Fri, 4 Dec 2026 12:33:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XRCFOP01 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5D061F000C2; Fri, 4 Dec 2026 12:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796387636; bh=AsAZC0GDo55ZW3Zoc7S6HO84M7bhTbch/PI2SS44cVA=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=XRCFOP01e7nyO9wQm4o+zFuR++haAcuHUHj7IjDMT7Bhpp+1rwcgiyzTHAMYUrS04 bmL1htXszdDAE3fRvoE2GMXjXqmNnnJ2RgV+Bktlg0c9xsHIrluHM3+tBr+vznEMxU dheeoPkdQZFEZozMbhT38z2tgVdEcHyjCbPEaLpZGcmYonIVBwL7vO36jHxuskW+Lx 0w/WgEfilJ3/ImsWuzBV0maH3I+CzdzAUvlzrGBvU6weglLd5m9qCbeqM1v/QeGN4o J/3VNjHk0295AySnbmdr+jVaym3yJuVvjQxTlV/Tzkjbc74JsKCvzk15XbMBZ6881m 8ZRQXecIAlJYw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 09/10] KVM: s390: arm64: Enable mcck forwarding Reply-To: sashiko-reviews@lists.linux.dev To: "Andreas Grapentin" Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-perf-users@vger.kernel.org, "Heiko Carstens" , "Vasily Gorbik" , "Alexander Gordeev" , "Christian Borntraeger" In-Reply-To: <20261204-host-irq-v1-9-a8387ee8a380@linux.ibm.com> References: <20261204-host-irq-v1-0-a8387ee8a380@linux.ibm.com> <20261204-host-irq-v1-9-a8387ee8a380@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 12:33:55 +0000 X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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 lo= ng 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 =3D &vcpu->arch.mcck_info; > + mci.val =3D mcck->mcic; > + > + if (!mcck->mcic) > + return; > + > + esr =3D 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? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-host-irq-v= 1-0-a8387ee8a380@linux.ibm.com?part=3D9