[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251009165427.437379-1-sascha.bischoff@arm.com>
Date: Thu, 9 Oct 2025 16:54:47 +0000
From: Sascha Bischoff <Sascha.Bischoff@....com>
To: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "kvmarm@...ts.linux.dev"
<kvmarm@...ts.linux.dev>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "kvm@...r.kernel.org" <kvm@...r.kernel.org>
CC: nd <nd@....com>, Mark Rutland <Mark.Rutland@....com>, Mark Brown
<broonie@...nel.org>, Catalin Marinas <Catalin.Marinas@....com>,
"maz@...nel.org" <maz@...nel.org>, "oliver.upton@...ux.dev"
<oliver.upton@...ux.dev>, Joey Gouly <Joey.Gouly@....com>, Suzuki Poulose
<Suzuki.Poulose@....com>, "yuzenghui@...wei.com" <yuzenghui@...wei.com>,
"will@...nel.org" <will@...nel.org>, "lpieralisi@...nel.org"
<lpieralisi@...nel.org>
Subject: [PATCH v2 0/4] arm64/sysreg: Introduce Prefix descriptor and
generated ICH_VMCR_EL2 support
This series introduces support for conditional field encodings in the
sysreg description framework and migrates the vGIC-v3 code to use
generated definitions for ICH_VMCR_EL2, in part as an example of how
the Prefix descriptor can be used. In addition, it fixes an issue with
the tracking of incomplete system register efinitions.
The first patch addresses an issue where next_bit was checked for > 0
instead of >= 0 to determine if all 64-bits had been defined. The
result was that the generator didn't catch cases where bit 0 of a
system register was not defined. Thankfully, there were no such cases.
The next patch adds the Prefix descriptor, allowing sysreg definitions
to be prefixed with an optional condition (e.g., GICv3 vs GICv5). The
Prefix/EndPrefix construct enables generation of prefixed field
encodings without affecting legacy definitions which remain
unchanged. This forms the basis for supporting feature-dependent
register layouts.
The third patch adds the generated description for ICH_VMCR_EL2,
including both its GICv3 and GICv5 variants. This register was
previously defined manually in the KVM GICv3 code; moving it into the
sysreg framework ensures consistency and reduces duplication.
Finally, the last patch updates the KVM vGIC-v3 implementation to use
the generated ICH_VMCR_EL2 definitions. This replaces and removes the
hand-written definitions, with no functional change to behaviour.
Together, these patches complete the migration of ICH_VMCR_EL2 to the
sysreg framework and establish the infrastructure needed to describe
registers with multiple field encodings.
Thanks,
Sascha
Sascha Bischoff (4):
arm64/sysreg: Fix checks for incomplete sysreg definitions
arm64/sysreg: Support feature-specific fields with 'Prefix' descriptor
arm64/sysreg: Add ICH_VMCR_EL2
KVM: arm64: gic-v3: Switch vGIC-v3 to use generated ICH_VMCR_EL2
arch/arm64/include/asm/sysreg.h | 21 ----
arch/arm64/kvm/hyp/vgic-v3-sr.c | 64 ++++++-------
arch/arm64/kvm/vgic/vgic-v3-nested.c | 8 +-
arch/arm64/kvm/vgic/vgic-v3.c | 42 ++++----
arch/arm64/tools/gen-sysreg.awk | 137 ++++++++++++++++++---------
arch/arm64/tools/sysreg | 21 ++++
6 files changed, 162 insertions(+), 131 deletions(-)
--
2.34.1
Powered by blists - more mailing lists