From: sashiko-bot@kernel.org
To: "Steffen Eiden" <seiden@linux.ibm.com>
Cc: kvmarm@lists.linux.dev,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Oliver Upton" <oupton@kernel.org>,
kvm@vger.kernel.org, "Marc Zyngier" <maz@kernel.org>,
linux-s390@vger.kernel.org, "Vasily Gorbik" <gor@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH v2 17/20] KVM: s390: arm64: Finalize page fault handling
Date: Mon, 31 Aug 2026 21:52:41 +0000 [thread overview]
Message-ID: <20260831215242.5B6971F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260831145536.913567-18-seiden@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Architectural Violation: Injected aborts incorrectly set the ESR_ELx_IL bit conditionally.
--
commit b703e320efef81f7ebb0637eda7231ef63b3ca22
Author: Steffen Eiden <seiden@linux.ibm.com>
KVM: s390: arm64: Finalize page fault handling
This commit finalizes page fault handling by replacing temporary error
returns with proper ARM64 exception injection. Specifically, it routes
PGM_ADDRESSING faults and out-of-bounds IPAs to kvm_inject_size_fault()
and kvm_inject_sea().
> diff --git a/arch/s390/kvm/arm64/mmu.c b/arch/s390/kvm/arm64/mmu.c
> index bf3442d3609b2..b5f1dc3ca0d28 100644
> --- a/arch/s390/kvm/arm64/mmu.c
> +++ b/arch/s390/kvm/arm64/mmu.c
> @@ -30,12 +30,14 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, gpa_t fault_ipa,
> ret = kvm_s390_faultin_gfn(vcpu, NULL, &f);
> if (ret <= 0)
> return ret;
> - if (ret == PGM_ADDRESSING)
> + if (ret == PGM_ADDRESSING) {
> /*
> - * Without the relevant sysregs we cannot do anything for now.
> - * Go back to userspace with an error. TODO sysreg handling
> + * There is no page with the requested address. Inject size fault
> + * which is the closest arm match to PGM-addressing
> */
> - return -ENOEXEC;
> + kvm_inject_size_fault(vcpu);
[Severity: High]
This is a pre-existing issue, but does routing faults to
kvm_inject_size_fault() expose an architectural violation for 16-bit
instructions?
When a guest user-space process executing a 16-bit instruction triggers a
fault, this patch routes it to the exception injection logic. That logic
currently conditionally sets the IL bit based on instruction length:
arch/s390/kvm/arm64/inject_fault.c:inject_abt64() {
...
if (kvm_vcpu_trap_il_is32bit(vcpu))
esr |= ESR_ELx_IL;
...
}
(The same conditional logic is also present in kvm_inject_undefined()).
For an SError, Instruction Abort, or Data Abort with ISV == 0, the
architecture mandates that the IL bit must be 1 regardless of the trapping
instruction's length.
Could this cause KVM to synthesize an ESR_ELx with IL=0 instead of the
required IL=1 for 16-bit instructions? If the guest OS exception handler
receives an architecturally invalid syndrome, could it malfunction or lead to
a guest kernel panic?
> + return 1;
> + }
> KVM_BUG_ON(ret, vcpu->kvm);
> return -EINVAL;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260831145536.913567-1-seiden@linux.ibm.com?part=17
next prev parent reply other threads:[~2026-08-31 21:52 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 14:55 [PATCH v2 00/20] KVM: arm64 on s390 System Register Handling Steffen Eiden
2026-08-31 14:55 ` [PATCH v2 01/20] KVM: arm64: Refactor idreg caching into dedicated structure Steffen Eiden
2026-08-31 18:06 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 02/20] KVM: arm64: Extract number of sys_reg_desc into a constant Steffen Eiden
2026-08-31 18:08 ` sashiko-bot
2026-09-01 7:48 ` Marc Zyngier
2026-08-31 14:55 ` [PATCH v2 03/20] arm64: sysreg: Define OSLSR_EL1_OSLK_MASK Steffen Eiden
2026-08-31 18:18 ` sashiko-bot
2026-09-01 7:51 ` Marc Zyngier
2026-09-01 9:25 ` Steffen Eiden
2026-09-02 7:49 ` Marc Zyngier
2026-08-31 14:55 ` [PATCH v2 04/20] arm64: Share more arm64 headers with s390 Steffen Eiden
2026-08-31 18:31 ` sashiko-bot
2026-09-01 8:08 ` Marc Zyngier
2026-08-31 14:55 ` [PATCH v2 05/20] KVM: s390: arm64: Prepare for sharing more arm64 code Steffen Eiden
2026-08-31 18:42 ` sashiko-bot
2026-09-01 8:15 ` Marc Zyngier
2026-08-31 14:55 ` [PATCH v2 06/20] KVM: arm64: Prepare sys_regs.c for sharing with s390 Steffen Eiden
2026-08-31 18:45 ` sashiko-bot
2026-09-01 8:17 ` Marc Zyngier
2026-09-01 9:29 ` Steffen Eiden
2026-08-31 14:55 ` [PATCH v2 07/20] KVM: arm64: Share more arm64 code " Steffen Eiden
2026-08-31 19:01 ` sashiko-bot
2026-09-01 8:30 ` Marc Zyngier
2026-08-31 14:55 ` [PATCH v2 08/20] s390: tools: Allow sharing arm64/kvm headers Steffen Eiden
2026-08-31 19:03 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 09/20] s390: Introduce read/write ARM sysreg instructions Steffen Eiden
2026-08-31 19:16 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 10/20] s390: Add functions to query arm guest time Steffen Eiden
2026-08-31 19:24 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 11/20] KVM: s390: arm64: Query Available Arm features Steffen Eiden
2026-08-31 19:46 ` sashiko-bot
2026-09-01 11:44 ` Janosch Frank
2026-09-01 14:25 ` Steffen Eiden
2026-09-01 16:36 ` Janosch Frank
2026-08-31 14:55 ` [PATCH v2 12/20] KVM: s390: arm64: Implement feature sanitisation Steffen Eiden
2026-08-31 20:11 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 13/20] KVM: s390: arm64: Implement arm sysreg managing infrastructure Steffen Eiden
2026-08-31 20:33 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 14/20] KVM: s390: arm64: Integrate sysreg into the host Steffen Eiden
2026-08-31 21:15 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 15/20] KVM: s390: arm64: Use QAAF init save area Steffen Eiden
2026-08-31 21:32 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 16/20] KVM: s390: arm64: Implement exception injection Steffen Eiden
2026-08-31 21:38 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 17/20] KVM: s390: arm64: Finalize page fault handling Steffen Eiden
2026-08-31 21:52 ` sashiko-bot [this message]
2026-08-31 14:55 ` [PATCH v2 18/20] KVM: s390: arm64: Implement SVE for arm guests Steffen Eiden
2026-08-31 22:16 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 19/20] KVM: s390: arm64: Promote PTRAUTH capability Steffen Eiden
2026-08-31 22:35 ` sashiko-bot
2026-08-31 14:55 ` [PATCH v2 20/20] s390: Report AEF features to sysfs Steffen Eiden
2026-08-31 22:43 ` 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=20260831215242.5B6971F00A3D@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-s390@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=seiden@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.