Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Colton Lewis" <coltonlewis@google.com>
Cc: kvmarm@lists.linux.dev, "Marc Zyngier" <maz@kernel.org>,
	"Oliver Upton" <oupton@kernel.org>
Subject: Re: [PATCH 6.6 v2 1/6] arm64: sysreg: Add layout for ID_AA64MMFR4_EL1
Date: Wed, 08 Jul 2026 23:03:59 +0000	[thread overview]
Message-ID: <20260708230400.07B351F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708225124.4130846-2-coltonlewis@google.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `EIESB` field in `ID_AA64MMFR4_EL1` is incorrectly defined as a `SignedEnum` instead of an `UnsignedEnum`, which will break cross-CPU feature resolution and capability detection.
--

--- Patch [1]: [PATCH 6.6 v2 1/6] arm64: sysreg: Add layout for ID_AA64MMFR4_EL1 ---
commit 553e432fbf7b950e883b1046b692639bcd77b3c1
Author: Marc Zyngier <maz@kernel.org>

arm64: sysreg: Add layout for ID_AA64MMFR4_EL1

ARMv9.5 has introduced ID_AA64MMFR4_EL1 with a bunch of new features. Add the 
corresponding layout.

Link: https://lore.kernel.org/r/20240122181344.258974-5-maz@kernel.org

> diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg
> index 76ce150e7347e..f7180d391f829 100644
> --- a/arch/arm64/tools/sysreg
> +++ b/arch/arm64/tools/sysreg
> @@ -1669,6 +1669,43 @@ UnsignedEnum	3:0	TCRX

[ ... ]

> +UnsignedEnum	11:8	ASID2
> +	0b0000	NI
> +	0b0001	IMP
> +EndEnum
> +SignedEnum	7:4	EIESB
> +	0b0000	NI
> +	0b0001	ToEL3
> +	0b0010	ToELx
> +	0b1111	ANY
> +EndEnum

[Severity: Medium]
Will defining EIESB as a SignedEnum cause issues with capability detection?

If this generates ID_AA64MMFR4_EL1_EIESB_SIGNED as true, it seems like
the cpufeature framework will extract and evaluate the 4-bit field 0b1111 
(ANY) as -1.

Since -1 < 2 (ToELx), could this cause the kernel to fail to detect the ANY
error injection capability or resolve to the wrong capability level on
heterogeneous systems?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260708225124.4130846-1-coltonlewis@google.com?part=1

  reply	other threads:[~2026-07-08 23:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 22:51 [PATCH 6.6 v2 0/6] arm64: KVM: Backport VHE-only boot fixes Colton Lewis
2026-07-08 22:51 ` [PATCH 6.6 v2 1/6] arm64: sysreg: Add layout for ID_AA64MMFR4_EL1 Colton Lewis
2026-07-08 23:03   ` sashiko-bot [this message]
2026-07-09 10:16   ` Marc Zyngier
2026-07-09 20:30     ` Colton Lewis
2026-07-08 22:51 ` [PATCH 6.6 v2 2/6] arm64: Treat HCR_EL2.E2H as RES1 when ID_AA64MMFR4_EL1.E2H0 is negative Colton Lewis
2026-07-08 22:59   ` sashiko-bot
2026-07-08 22:51 ` [PATCH 6.6 v2 3/6] arm64: Fix early handling of FEAT_E2H0 not being implemented Colton Lewis
2026-07-08 23:01   ` sashiko-bot
2026-07-08 22:51 ` [PATCH 6.6 v2 4/6] KVM: arm64: Initialize HCR_EL2.E2H early Colton Lewis
2026-07-08 23:03   ` sashiko-bot
2026-07-08 22:51 ` [PATCH 6.6 v2 5/6] KVM: arm64: Initialize SCTLR_EL1 in __kvm_hyp_init_cpu() Colton Lewis
2026-07-08 22:51 ` [PATCH 6.6 v2 6/6] arm64: Revamp HCR_EL2.E2H RES1 detection Colton Lewis
2026-07-08 22:59   ` 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=20260708230400.07B351F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=coltonlewis@google.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oupton@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