2023-12-09 01:04:37

by Mark Brown

[permalink] [raw]
Subject: [PATCH 00/13] arm64/sysreg: System register updates from the 2023-09 XML release

A number of serieses on the list have updates updates and additions to
the system registers, and as a result of the work being done on KVM
(especially nested virtualisation) there are overlaps and duplication of
work between people unaware of other pending serieses. This series
collects together all the work that's been done on updating the system
register definitions that don't have pending review issues which I'm
aware of with the aim of at least making it easier to find things.

Since the system register definitions are part of the architecture
they're unlikely to change based on review of the serieses that they are
included in so it seems like it might make life easier to merge these
updates even without their users. There is a small amount of overhead
from the increased size of the source and generated files but on the
other hand it would reduce the size of the serieses while they are in
review and make it less likely that we get duplicated work.

Signed-off-by: Mark Brown <[email protected]>
---
Fuad Tabba (2):
arm64/sysreg: Update HFGITR_EL2 definiton to DDI0601 2023-09
arm64/sysreg: Add definition for HAFGRTR_EL2

Joey Gouly (2):
arm64/sysreg: add system register POR_EL{0,1}
arm64/sysreg: update CPACR_EL1 register

Mark Brown (9):
arm64/sysreg: Add definition for ID_AA64PFR2_EL1
arm64/sysreg: Update ID_AA64ISAR2_EL1 defintion for DDI0601 2023-09
arm64/sysreg: Add definition for ID_AA64ISAR3_EL1
arm64/sysreg: Add definition for ID_AA64FPFR0_EL1
arm64/sysreg: Update ID_AA64SMFR0_EL1 definition for DDI0601 2023-09
arm64/sysreg: Update SCTLR_EL1 for DDI0601 2023-09
arm64/sysreg: Update HCRX_EL2 definition for DDI0601 2023-09
arm64/sysreg: Add definition for FPMR
arm64/sysreg: Add new system registers for GCS

arch/arm64/include/asm/sysreg.h | 13 ++
arch/arm64/tools/sysreg | 270 ++++++++++++++++++++++++++++++++++++++--
2 files changed, 273 insertions(+), 10 deletions(-)
---
base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
change-id: 20231208-b4-arm64-sysreg-additions-c1f3b4acdff8

Best regards,
--
Mark Brown <[email protected]>


2023-12-09 01:04:46

by Mark Brown

[permalink] [raw]
Subject: [PATCH 10/13] arm64/sysreg: Update SCTLR_EL1 for DDI0601 2023-09

DDI0601 2023-09 defines some new fields in SCTLR_EL1 controlling new MTE
and floating point features. Update our sysreg definition to reflect these.

Signed-off-by: Mark Brown <[email protected]>
---
arch/arm64/tools/sysreg | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg
index 839f7cca53e0..4137179e7570 100644
--- a/arch/arm64/tools/sysreg
+++ b/arch/arm64/tools/sysreg
@@ -1791,7 +1791,8 @@ Field 63 TIDCP
Field 62 SPINTMASK
Field 61 NMI
Field 60 EnTP2
-Res0 59:58
+Field 59 TCSO
+Field 58 TCSO0
Field 57 EPAN
Field 56 EnALS
Field 55 EnAS0
@@ -1820,7 +1821,7 @@ EndEnum
Field 37 ITFSB
Field 36 BT1
Field 35 BT0
-Res0 34
+Field 34 EnFPM
Field 33 MSCEn
Field 32 CMOW
Field 31 EnIA

--
2.39.2

2023-12-09 01:04:46

by Mark Brown

[permalink] [raw]
Subject: [PATCH 13/13] arm64/sysreg: Add new system registers for GCS

FEAT_GCS introduces a number of new system registers. Add the registers
available up to EL2 to sysreg as per DDI0601 2022-12.

Signed-off-by: Mark Brown <[email protected]>
---
arch/arm64/tools/sysreg | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)

diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg
index 1c6d1c904750..b2007963523e 100644
--- a/arch/arm64/tools/sysreg
+++ b/arch/arm64/tools/sysreg
@@ -1903,6 +1903,41 @@ Sysreg SMCR_EL1 3 0 1 2 6
Fields SMCR_ELx
EndSysreg

+SysregFields GCSCR_ELx
+Res0 63:10
+Field 9 STREn
+Field 8 PUSHMEn
+Res0 7
+Field 6 EXLOCKEN
+Field 5 RVCHKEN
+Res0 4:1
+Field 0 PCRSEL
+EndSysregFields
+
+Sysreg GCSCR_EL1 3 0 2 5 0
+Fields GCSCR_ELx
+EndSysreg
+
+SysregFields GCSPR_ELx
+Field 63:3 PTR
+Res0 2:0
+EndSysregFields
+
+Sysreg GCSPR_EL1 3 0 2 5 1
+Fields GCSPR_ELx
+EndSysreg
+
+Sysreg GCSCRE0_EL1 3 0 2 5 2
+Res0 63:11
+Field 10 nTR
+Field 9 STREn
+Field 8 PUSHMEn
+Res0 7:6
+Field 5 RVCHKEN
+Res0 4:1
+Field 0 PCRSEL
+EndSysreg
+
Sysreg ALLINT 3 0 4 3 0
Res0 63:14
Field 13 ALLINT
@@ -2133,6 +2168,10 @@ Field 4 DZP
Field 3:0 BS
EndSysreg

+Sysreg GCSPR_EL0 3 3 2 5 1
+Fields GCSPR_ELx
+EndSysreg
+
Sysreg SVCR 3 3 4 2 2
Res0 63:2
Field 1 ZA
@@ -2531,6 +2570,14 @@ Sysreg SMCR_EL2 3 4 1 2 6
Fields SMCR_ELx
EndSysreg

+Sysreg GCSCR_EL2 3 4 2 5 0
+Fields GCSCR_ELx
+EndSysreg
+
+Sysreg GCSPR_EL2 3 4 2 5 1
+Fields GCSPR_ELx
+EndSysreg
+
Sysreg DACR32_EL2 3 4 3 0 0
Res0 63:32
Field 31:30 D15
@@ -2590,6 +2637,14 @@ Sysreg SMCR_EL12 3 5 1 2 6
Fields SMCR_ELx
EndSysreg

+Sysreg GCSCR_EL12 3 5 2 5 0
+Fields GCSCR_ELx
+EndSysreg
+
+Sysreg GCSPR_EL12 3 5 2 5 1
+Fields GCSPR_ELx
+EndSysreg
+
Sysreg FAR_EL12 3 5 6 0 0
Field 63:0 ADDR
EndSysreg

--
2.39.2

2023-12-11 09:20:44

by Fuad Tabba

[permalink] [raw]
Subject: Re: [PATCH 10/13] arm64/sysreg: Update SCTLR_EL1 for DDI0601 2023-09

Hi Mark,


On Sat, Dec 9, 2023 at 1:03 AM Mark Brown <[email protected]> wrote:
>
> DDI0601 2023-09 defines some new fields in SCTLR_EL1 controlling new MTE
> and floating point features. Update our sysreg definition to reflect these.
>
> Signed-off-by: Mark Brown <[email protected]>
> ---

Reviewed-by: Fuad Tabba <[email protected]>

Cheers,
/fuad

> arch/arm64/tools/sysreg | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg
> index 839f7cca53e0..4137179e7570 100644
> --- a/arch/arm64/tools/sysreg
> +++ b/arch/arm64/tools/sysreg
> @@ -1791,7 +1791,8 @@ Field 63 TIDCP
> Field 62 SPINTMASK
> Field 61 NMI
> Field 60 EnTP2
> -Res0 59:58
> +Field 59 TCSO
> +Field 58 TCSO0
> Field 57 EPAN
> Field 56 EnALS
> Field 55 EnAS0
> @@ -1820,7 +1821,7 @@ EndEnum
> Field 37 ITFSB
> Field 36 BT1
> Field 35 BT0
> -Res0 34
> +Field 34 EnFPM
> Field 33 MSCEn
> Field 32 CMOW
> Field 31 EnIA
>
> --
> 2.39.2
>

2023-12-11 09:39:04

by Fuad Tabba

[permalink] [raw]
Subject: Re: [PATCH 13/13] arm64/sysreg: Add new system registers for GCS

Hi Mark,

On Sat, Dec 9, 2023 at 1:04 AM Mark Brown <[email protected]> wrote:
>
> FEAT_GCS introduces a number of new system registers. Add the registers
> available up to EL2 to sysreg as per DDI0601 2022-12.
>
> Signed-off-by: Mark Brown <[email protected]>
> ---
> arch/arm64/tools/sysreg | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg
> index 1c6d1c904750..b2007963523e 100644
> --- a/arch/arm64/tools/sysreg
> +++ b/arch/arm64/tools/sysreg
> @@ -1903,6 +1903,41 @@ Sysreg SMCR_EL1 3 0 1 2 6
> Fields SMCR_ELx
> EndSysreg
>
> +SysregFields GCSCR_ELx
> +Res0 63:10
> +Field 9 STREn
> +Field 8 PUSHMEn

This is related to my comment for patch 11/13 on HCRX_EL2, now we have
a case where the n is in the spec itself, rather than a prefix. Not
sure if it would be good to add an n as a prefix as well to these,
since they do trap at 0, or if you should just forget my comment on
patch 11 :)

Reviewed-by: Fuad Tabba <[email protected]>

Cheers,
/fuad



> +Res0 7
> +Field 6 EXLOCKEN
> +Field 5 RVCHKEN
> +Res0 4:1
> +Field 0 PCRSEL
> +EndSysregFields
> +
> +Sysreg GCSCR_EL1 3 0 2 5 0
> +Fields GCSCR_ELx
> +EndSysreg
> +
> +SysregFields GCSPR_ELx
> +Field 63:3 PTR
> +Res0 2:0
> +EndSysregFields
> +
> +Sysreg GCSPR_EL1 3 0 2 5 1
> +Fields GCSPR_ELx
> +EndSysreg
> +
> +Sysreg GCSCRE0_EL1 3 0 2 5 2
> +Res0 63:11
> +Field 10 nTR
> +Field 9 STREn
> +Field 8 PUSHMEn
> +Res0 7:6
> +Field 5 RVCHKEN
> +Res0 4:1
> +Field 0 PCRSEL
> +EndSysreg
> +
> Sysreg ALLINT 3 0 4 3 0
> Res0 63:14
> Field 13 ALLINT
> @@ -2133,6 +2168,10 @@ Field 4 DZP
> Field 3:0 BS
> EndSysreg
>
> +Sysreg GCSPR_EL0 3 3 2 5 1
> +Fields GCSPR_ELx
> +EndSysreg
> +
> Sysreg SVCR 3 3 4 2 2
> Res0 63:2
> Field 1 ZA
> @@ -2531,6 +2570,14 @@ Sysreg SMCR_EL2 3 4 1 2 6
> Fields SMCR_ELx
> EndSysreg
>
> +Sysreg GCSCR_EL2 3 4 2 5 0
> +Fields GCSCR_ELx
> +EndSysreg
> +
> +Sysreg GCSPR_EL2 3 4 2 5 1
> +Fields GCSPR_ELx
> +EndSysreg
> +
> Sysreg DACR32_EL2 3 4 3 0 0
> Res0 63:32
> Field 31:30 D15
> @@ -2590,6 +2637,14 @@ Sysreg SMCR_EL12 3 5 1 2 6
> Fields SMCR_ELx
> EndSysreg
>
> +Sysreg GCSCR_EL12 3 5 2 5 0
> +Fields GCSCR_ELx
> +EndSysreg
> +
> +Sysreg GCSPR_EL12 3 5 2 5 1
> +Fields GCSPR_ELx
> +EndSysreg
> +
> Sysreg FAR_EL12 3 5 6 0 0
> Field 63:0 ADDR
> EndSysreg
>
> --
> 2.39.2
>

2023-12-11 20:27:52

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH 00/13] arm64/sysreg: System register updates from the 2023-09 XML release

On Sat, 09 Dec 2023 01:02:46 +0000, [email protected] wrote:
> A number of serieses on the list have updates updates and additions to
> the system registers, and as a result of the work being done on KVM
> (especially nested virtualisation) there are overlaps and duplication of
> work between people unaware of other pending serieses. This series
> collects together all the work that's been done on updating the system
> register definitions that don't have pending review issues which I'm
> aware of with the aim of at least making it easier to find things.
>
> [...]

Applied to arm64 (for-next/sysregs), thanks!

[01/13] arm64/sysreg: Update HFGITR_EL2 definiton to DDI0601 2023-09
https://git.kernel.org/arm64/c/256f442895ed
[02/13] arm64/sysreg: Add definition for HAFGRTR_EL2
https://git.kernel.org/arm64/c/41bb68fbd016
[03/13] arm64/sysreg: add system register POR_EL{0,1}
https://git.kernel.org/arm64/c/c0c5a8ea96b8
[04/13] arm64/sysreg: update CPACR_EL1 register
https://git.kernel.org/arm64/c/35768b23d830
[05/13] arm64/sysreg: Add definition for ID_AA64PFR2_EL1
https://git.kernel.org/arm64/c/9fb5dc53a117
[06/13] arm64/sysreg: Update ID_AA64ISAR2_EL1 defintion for DDI0601 2023-09
https://git.kernel.org/arm64/c/6e3dcfd13975
[07/13] arm64/sysreg: Add definition for ID_AA64ISAR3_EL1
https://git.kernel.org/arm64/c/b5aefb668701
[08/13] arm64/sysreg: Add definition for ID_AA64FPFR0_EL1
https://git.kernel.org/arm64/c/9e4f409b07df
[09/13] arm64/sysreg: Update ID_AA64SMFR0_EL1 definition for DDI0601 2023-09
https://git.kernel.org/arm64/c/8afe582d7700
[10/13] arm64/sysreg: Update SCTLR_EL1 for DDI0601 2023-09
https://git.kernel.org/arm64/c/a6052284a9f9
[11/13] arm64/sysreg: Update HCRX_EL2 definition for DDI0601 2023-09
https://git.kernel.org/arm64/c/126cb3a60d35
[12/13] arm64/sysreg: Add definition for FPMR
https://git.kernel.org/arm64/c/e3a649ecf8b9
[13/13] arm64/sysreg: Add new system registers for GCS
https://git.kernel.org/arm64/c/e94e06d8a796

Cheers,
--
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev