arm64/sysreg: ISR register conversions
cover arm64/sysreg: ISR register conversions
This series pulls the generated sysreg updates out of the previously posted series for NMI support then adds an incremental patch on top of that using the generated constant for ISR_EL1.A in the KVM entry code suggested by Marc Zyngier. This should hopefully help these progress without getting tied up by the more involved NMI rework (and cut down the size of that series if they do get merged).
Mark Brown (3):
arm64/sysreg: Add definition for ICC_NMIAR1_EL1 arm64/sysreg: Add definition of ISR_EL1
KVM: arm64: Use symbolic definition for ISR_EL1.A
arch/arm64/kvm/hyp/entry.S | 2 +- arch/arm64/tools/sysreg | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-)
base-commit: 30a0b95b1335e12efef89dd78518ed3e4a71a763
Signature · 1 line
2.30.2
PATCH 1/3 arm64/sysreg: Add definition for ICC_NMIAR1_EL1
FEAT_NMI adds a new interrupt status register for NMIs, ICC_NMIAR1_EL1. Add the definition for this register as per IHI0069H.
--- arch/arm64/tools/sysreg | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/tools/sysreg +5 -0
@@ -1078,3 +1078,8 @@ Field 23:16 LD Res0 15:8 Field 7:0 LR EndSysreg + +Sysreg ICC_NMIAR1_EL1 3 0 12 9 5 +Res0 63:24 +Field 23:0 INTID +EndSysreg
Signature · 1 line
2.30.2
PATCH 2/3 arm64/sysreg: Add definition of ISR_EL1
In reply to Mark BrownAdd a definition of ISR_EL1 as per DDI0487I.a. This register was not previously defined in sysreg.h, no functional changes.
--- arch/arm64/tools/sysreg | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/tools/sysreg +10 -0
@@ -1079,6 +1079,16 @@ Res0 15:8 Field 7:0 LR EndSysreg +Sysreg ISR_EL1 3 0 12 1 0 +Res0 63:11 +Field 10 IS +Field 9 FS +Field 8 A +Field 7 I +Field 6 F +Res0 5:0 +EndSysreg + Sysreg ICC_NMIAR1_EL1 3 0 12 9 5 Res0 63:24 Field 23:0 INTID
Signature · 1 line
2.30.2
PATCH 3/3 KVM: arm64: Use symbolic definition for ISR_EL1.A
In reply to Mark BrownNow that we are generating ISR_EL1 we have acquired a constant for ISR_EL1.A, use it rather than the magic number we had been using in the KVM entry code.
--- arch/arm64/kvm/hyp/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/hyp/entry.S +1 -1
@@ -171,7 +171,7 @@ alternative_else dsb sy // Synchronize against in-flight ld/st isb // Prevent an early read of side-effect free ISR mrs x2, isr_el1 - tbnz x2, #8, 2f // ISR_EL1.A + tbnz x2, #ISR_EL1_A_SHIFT, 2f ret nop 2:
Signature · 1 line
2.30.2
Marc Zyngier
maintainerRe: [PATCH v1 1/3] arm64/sysreg: Add definition for ICC_NMIAR1_EL1
In reply to Mark BrownQuoted 14 lines · Mark Brown
FEAT_NMIadds a new interrupt status register for NMIs,ICC_NMIAR1_EL1. Add the definition for this register as per IHI0069H.Signed-off-by Mark Brown <[email protected]>--- arch/arm64/tools/sysreg | 5 +++++ 1 file changed, 5 insertions(+)arch/arm64/tools/sysreg +0
-0
arch/arm64/tools/sysreg Field 23:16 LD · line 1085
Quoted 8 lines
arch/arm64/tools/sysreg +5
-0@@ -1078,3 +1078,8 @@ Field 23:16 LD Res0 15:8 Field 7:0 LR EndSysreg + +Sysreg ICC_NMIAR1_EL1 3 0 12 9 5 +Res0 63:24 +Field 23:0 INTID +EndSysreg
This patch should stay with the GIC patch adding NMIs, really.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH v1 2/3] arm64/sysreg: Add definition of ISR_EL1
In reply to Mark BrownQuoted 20 lines · Mark Brown
Add a definition of
ISR_EL1as per DDI0487I.a. This register was not previously defined insysreg.h, no functional changes.Signed-off-by Mark Brown <[email protected]>--- arch/arm64/tools/sysreg | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm64/tools/sysreg +3
-0@@ -1079,6 +1079,16 @@ Res0 15:8 Field 7:0 LR EndSysreg +Sysreg ISR_EL1 3 0 12 1 0 +Res0 63:11 +Field 10 IS
arch/arm64/tools/sysreg Res0 15:8 · line 1094
Quoted 10 lines
arch/arm64/tools/sysreg +7
-0+Field 9 FS +Field 8 A +Field 7 I +Field 6 F +Res0 5:0 +EndSysreg + Sysreg ICC_NMIAR1_EL1 3 0 12 9 5 Res0 63:24 Field 23:0 INTID
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH v1 3/3] KVM: arm64: Use symbolic definition for ISR_EL1.A
In reply to Mark BrownQuoted 16 lines · Mark Brown
Now that we are generating
ISR_EL1we have acquired a constant for ISR_EL1.A, use it rather than the magic number we had been using in the KVM entry code.Suggested-by Marc Zyngier <[email protected]>Signed-off-by Mark Brown <[email protected]>--- arch/arm64/kvm/hyp/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/kvm/hyp/entry.S +0
-0
arch/arm64/kvm/hyp/entry.S alternative_else · line 177
Quoted 8 lines
arch/arm64/kvm/hyp/entry.S +1
-1@@ -171,7 +171,7 @@ alternative_else dsb sy // Synchronize against in-flight ld/st isb // Prevent an early read of side-effect free ISR mrs x2, isr_el1 - tbnz x2, #8, 2f // ISR_EL1.A + tbnz x2, #ISR_EL1_A_SHIFT, 2f ret nop 2:
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH v1 1/3] arm64/sysreg: Add definition for ICC_NMIAR1_EL1
In reply to Marc ZyngierQuoted 8 lines · Marc Zyngier
arch/arm64/tools/sysreg Field 23:16 LD · line 1085
Quoted 4 lines · Mark Brown
arch/arm64/tools/sysreg +4
-0+Sysreg ICC_NMIAR1_EL1 3 0 12 9 5 +Res0 63:24 +Field 23:0 INTID +EndSysregThis patch should stay with the GIC patch adding NMIs, really.
Given the textual conflict with the ISR patch and the fact that the NMI series needs both anyway it seemed more productive to just carry them both in the cleanup series even if this one isn't immediately used.
Marc Zyngier
maintainerRe: [PATCH v1 1/3] arm64/sysreg: Add definition for ICC_NMIAR1_EL1
Quoted 11 lines · Mark Brown
Quoted 8 lines · Marc Zyngier
arch/arm64/tools/sysreg Field 23:16 LD · line 1085
Quoted 4 lines · Mark Brown
arch/arm64/tools/sysreg +4
-0+Sysreg ICC_NMIAR1_EL1 3 0 12 9 5 +Res0 63:24 +Field 23:0 INTID +EndSysregThis patch should stay with the GIC patch adding NMIs, really.
Quoted 3 lines
Given the textual conflict with the ISR patch and the fact that the NMI series needs both anyway it seemed more productive to just carry them both in the cleanup series even if this one isn't immediately used.
I thought the point of this series was to extract stuff that was otherwise useful, independently of the NMI series.
I must have misunderstood its purpose. This is instead making things harder to follow. Oh well.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH v1 1/3] arm64/sysreg: Add definition for ICC_NMIAR1_EL1
Quoted 8 lines · Marc Zyngier
Quoted 3 lines · Mark Brown
Given the textual conflict with the ISR patch and the fact that the NMI series needs both anyway it seemed more productive to just carry them both in the cleanup series even if this one isn't immediately used.
I thought the point of this series was to extract stuff that was otherwise useful, independently of the NMI series.
I tend to view the system register definitions as just generally useful, this being system register definitions plus a cleanup that could be done on top.
Quoted 2 lines
I must have misunderstood its purpose. This is instead making things harder to follow. Oh well.
I am hopeful that the extra cognative load of an additional register definition will be managable.
Marc Zyngier
maintainerRe: [PATCH v1 1/3] arm64/sysreg: Add definition for ICC_NMIAR1_EL1
Quoted 9 lines · Mark Brown
[1 <text/plain; us-ascii (7bit)>]
Quoted 5 lines · Marc Zyngier
Quoted 3 lines · Mark Brown
Given the textual conflict with the ISR patch and the fact that the NMI series needs both anyway it seemed more productive to just carry them both in the cleanup series even if this one isn't immediately used.
Quoted 6 lines
Quoted 2 lines
I thought the point of this series was to extract stuff that was otherwise useful, independently of the NMI series.
I tend to view the system register definitions as just generally useful, this being system register definitions plus a cleanup that could be done on top.
I tend to view the *unused* system register definition as pointless churn. We'll have to agree to disagree on that one.
Quoted 6 lines
Quoted 3 lines
I must have misunderstood its purpose. This is instead making things harder to follow. Oh well.
I am hopeful that the extra cognative load of an additional register definition will be managable.
You never know.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.