From: Marc Zyngier <maz@kernel.org>
To: Ben Horgan <ben.horgan@arm.com>
Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Oliver Upton <oupton@kernel.org>,
Zenghui Yu <yuzenghui@huawei.com>,
Yao Yuan <yaoyuan@linux.alibaba.com>
Subject: Re: [PATCH v3 1/9] arm64: Repaint ID_AA64MMFR2_EL1.IDS description
Date: Thu, 04 Dec 2025 12:02:46 +0000 [thread overview]
Message-ID: <86bjkepi8p.wl-maz@kernel.org> (raw)
In-Reply-To: <d546725b-e96f-461e-887d-8679cf747c7d@arm.com>
On Thu, 04 Dec 2025 11:13:41 +0000,
Ben Horgan <ben.horgan@arm.com> wrote:
>
> Hi Marc,
>
> On 12/4/25 10:48, Marc Zyngier wrote:
> > On Thu, 04 Dec 2025 10:36:54 +0000,
> > Ben Horgan <ben.horgan@arm.com> wrote:
> >>
> >> Hi Marc,
> >>
> >> On 12/4/25 09:47, Marc Zyngier wrote:
> >>> ID_AA64MMFR2_EL1.IDS, as described in the sysreg file, is pretty horrible
> >>> as it diesctly give the ESR value. Repaint it using the usual NI/IMP
> >>> identifiers to describe the absence/presence of FEAT_IDST.
> >>>
> >>> Signed-off-by: Marc Zyngier <maz@kernel.org>
> >>> ---
> >>> arch/arm64/kvm/hyp/nvhe/sys_regs.c | 2 +-
> >>> arch/arm64/tools/sysreg | 4 ++--
> >>> 2 files changed, 3 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/arch/arm64/kvm/hyp/nvhe/sys_regs.c b/arch/arm64/kvm/hyp/nvhe/sys_regs.c
> >>> index 82da9b03692d4..107d62921b168 100644
> >>> --- a/arch/arm64/kvm/hyp/nvhe/sys_regs.c
> >>> +++ b/arch/arm64/kvm/hyp/nvhe/sys_regs.c
> >>> @@ -134,7 +134,7 @@ static const struct pvm_ftr_bits pvmid_aa64mmfr2[] = {
> >>> MAX_FEAT(ID_AA64MMFR2_EL1, UAO, IMP),
> >>> MAX_FEAT(ID_AA64MMFR2_EL1, IESB, IMP),
> >>> MAX_FEAT(ID_AA64MMFR2_EL1, AT, IMP),
> >>> - MAX_FEAT_ENUM(ID_AA64MMFR2_EL1, IDS, 0x18),
> >>> + MAX_FEAT_ENUM(ID_AA64MMFR2_EL1, IDS, IMP),
> >>> MAX_FEAT(ID_AA64MMFR2_EL1, TTL, IMP),
> >>> MAX_FEAT(ID_AA64MMFR2_EL1, BBM, 2),
> >>> MAX_FEAT(ID_AA64MMFR2_EL1, E0PD, IMP),
> >>> diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg
> >>> index 1c6cdf9d54bba..3261e8791ac03 100644
> >>> --- a/arch/arm64/tools/sysreg
> >>> +++ b/arch/arm64/tools/sysreg
> >>> @@ -2257,8 +2257,8 @@ UnsignedEnum 43:40 FWB
> >>> 0b0001 IMP
> >>> EndEnum
> >>> Enum 39:36 IDS
> >>
> >> Should this also be changed to an UnsignedEnum?
> >
> > I'm not sure this brings much when you only have two values. If IDS
> > was growing a third value, and that there was an actual order in the
> > numbering scheme, then yes, that'd be useful.
>
> Joey just pointed out to me that there is a new third field. Not in the
> arm reference manual yet, but mentioned in the xml. I'm unsure if it's
> necessary to consider this at the moment though.
>
> https://developer.arm.com/documentation/ddi0601/2025-09/AArch64-Registers/ID-AA64MMFR2-EL1--AArch64-Memory-Model-Feature-Register-2?lang=en
Ah, nice catch. In which case I agree that this should become
UnsignedEnum, as the new EL3 feature is a strict superset of 0b0001.
I'll add fix for that on top.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2025-12-04 12:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-04 9:47 [PATCH v3 0/9] KVM: arm64: Add support for FEAT_IDST Marc Zyngier
2025-12-04 9:47 ` [PATCH v3 1/9] arm64: Repaint ID_AA64MMFR2_EL1.IDS description Marc Zyngier
2025-12-04 10:32 ` Joey Gouly
2025-12-04 10:36 ` Ben Horgan
2025-12-04 10:48 ` Marc Zyngier
2025-12-04 11:13 ` Ben Horgan
2025-12-04 12:02 ` Marc Zyngier [this message]
2025-12-04 9:47 ` [PATCH v3 2/9] KVM: arm64: Add trap routing for GMID_EL1 Marc Zyngier
2025-12-04 9:48 ` [PATCH v3 3/9] KVM: arm64: Add a generic synchronous exception injection primitive Marc Zyngier
2025-12-04 9:48 ` [PATCH v3 4/9] KVM: arm64: Handle FEAT_IDST for sysregs without specific handlers Marc Zyngier
2025-12-04 10:52 ` Joey Gouly
2025-12-05 6:10 ` Yao Yuan
2025-12-04 9:48 ` [PATCH v3 5/9] KVM: arm64: Handle CSSIDR2_EL1 and SMIDR_EL1 in a generic way Marc Zyngier
2025-12-05 6:25 ` Yao Yuan
2025-12-04 9:48 ` [PATCH v3 6/9] KVM: arm64: Force trap of GMID_EL1 when the guest doesn't have MTE Marc Zyngier
2025-12-05 6:02 ` Yao Yuan
2025-12-04 9:48 ` [PATCH v3 7/9] KVM: arm64: pkvm: Add a generic synchronous exception injection primitive Marc Zyngier
2025-12-04 9:48 ` [PATCH v3 8/9] KVM: arm64: pkvm: Report optional ID register traps with a 0x18 syndrome Marc Zyngier
2025-12-04 10:51 ` Ben Horgan
2025-12-04 12:06 ` Marc Zyngier
2025-12-04 9:48 ` [PATCH v3 9/9] KVM: arm64: selftests: Add a test for FEAT_IDST Marc Zyngier
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=86bjkepi8p.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=ben.horgan@arm.com \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=oupton@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=yaoyuan@linux.alibaba.com \
--cc=yuzenghui@huawei.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.