Skip to contentSkip to conversation

ARM: KVM: Correctly order SGI register entries in the cp15 array

PATCH In review Marc Zyngier 2 participants 3 messages Oct 4, 2018 – Oct 5, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: KVM: Correctly order SGI register entries in the cp15 array

The ICC_ASGI1R and ICC_SGI0R register entries in the cp15 array are not correctly ordered, leading to a BUG() at boot time.

Move them to their natural location.

Fixes 3e8a8a50c7ef ("KVM: arm: vgic-v3: Add support for ICC_SGI0R and ICC_ASGI1R accesses")

---
Paolo, Radim,

Could you please send this patch directly to Greg so that it makes it into 4.19? I thought I had it fixed long before the merge window, and obviously didn't...

Thanks,

	M.
 arch/arm/kvm/coproc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/kvm/coproc.c +4 -4
index 450c7a4fbc8a..cb094e55dc5f 100644
@@ -478,15 +478,15 @@ static const struct coproc_reg cp15_regs[] = {
 
 	/* ICC_SGI1R */
 	{ CRm64(12), Op1( 0), is64, access_gic_sgi},
-	/* ICC_ASGI1R */
-	{ CRm64(12), Op1( 1), is64, access_gic_sgi},
-	/* ICC_SGI0R */
-	{ CRm64(12), Op1( 2), is64, access_gic_sgi},
 
 	/* VBAR: swapped by interrupt.S. */
 	{ CRn(12), CRm( 0), Op1( 0), Op2( 0), is32,
 			NULL, reset_val, c12_VBAR, 0x00000000 },
 
+	/* ICC_ASGI1R */
+	{ CRm64(12), Op1( 1), is64, access_gic_sgi},
+	/* ICC_SGI0R */
+	{ CRm64(12), Op1( 2), is64, access_gic_sgi},
 	/* ICC_SRE */
 	{ CRn(12), CRm(12), Op1( 0), Op2(5), is32, access_gic_sre },
 
Signature · 1 line
2.19.0
#1 lore raw
Quoted 8 lines · Marc Zyngier

The ICC_ASGI1R and ICC_SGI0R register entries in the cp15 array are not correctly ordered, leading to a BUG() at boot time.

Move them to their natural location.

Fixes 3e8a8a50c7ef ("KVM: arm: vgic-v3: Add support for ICC_SGI0R and ICC_ASGI1R accesses")
Quoted 6 lines

---
Paolo, Radim,

Could you please send this patch directly to Greg so that it makes it into 4.19? I thought I had it fixed long before the merge window, and obviously didn't...

Thanks for the quick fix! I probably won't be able to test this until 8h from now but this looks obviously correct.

Quoted 33 lines

Thanks,

	M.
 arch/arm/kvm/coproc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/kvm/coproc.c +4 -4
index 450c7a4fbc8a..cb094e55dc5f 100644
@@ -478,15 +478,15 @@ static const struct coproc_reg cp15_regs[] = {
 
 	/* ICC_SGI1R */
 	{ CRm64(12), Op1( 0), is64, access_gic_sgi},
-	/* ICC_ASGI1R */
-	{ CRm64(12), Op1( 1), is64, access_gic_sgi},
-	/* ICC_SGI0R */
-	{ CRm64(12), Op1( 2), is64, access_gic_sgi},
 
 	/* VBAR: swapped by interrupt.S. */
 	{ CRn(12), CRm( 0), Op1( 0), Op2( 0), is32,
 			NULL, reset_val, c12_VBAR, 0x00000000 },
 
+	/* ICC_ASGI1R */
+	{ CRm64(12), Op1( 1), is64, access_gic_sgi},
+	/* ICC_SGI0R */
+	{ CRm64(12), Op1( 2), is64, access_gic_sgi},
 	/* ICC_SRE */
 	{ CRn(12), CRm(12), Op1( 0), Op2(5), is32, access_gic_sre },
 
Signature · 1 line
Florian
Tested-by on v1 1/1
#2 lore raw
In reply to Marc Zyngier

Le 10/04/18 à 02:29, Marc Zyngier a écrit :

Quoted 8 lines

The ICC_ASGI1R and ICC_SGI0R register entries in the cp15 array are not correctly ordered, leading to a BUG() at boot time.

Move them to their natural location.

Fixes 3e8a8a50c7ef ("KVM: arm: vgic-v3: Add support for ICC_SGI0R and ICC_ASGI1R accesses")

Thanks!

Signature · 5 lines
Florian
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm