Skip to contentSkip to conversation

hw/intc/arm_gicv5: Fix value of the IRS_DEVARCH register

PATCH In review Zenghui Yu 3 participants 3 messages Nov 24

lore
Share & tools
lore

Zenghui Yu

author
#0 lore raw

PATCH 1/1 hw/intc/arm_gicv5: Fix value of the IRS_DEVARCH register

The GICv5 spec says bits [31:21] of IRS_DEVARCH are 0x23b. We wrongly shifted it by 31 instead of 21, so guests read 0x80105a19 rather than 0x47705a19.

Fixes 22232793ecb8 ("hw/intc/arm_gicv5: Implement CoreSight ID registers")
---
 hw/intc/arm_gicv5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/intc/arm_gicv5.c +1 -1
index 26dcbc82ed..59b8596bf0 100644
@@ -318,7 +318,7 @@ FIELD(ICSR, HM, 5, 1)
 FIELD(ICSR, PRIORITY, 11, 5)
 FIELD(ICSR, IAFFID, 32, 16)
 
-#define IRS_DEVARCH_VALUE ((0x23b << 31) | (0x1 << 20) | 0x5a19)
+#define IRS_DEVARCH_VALUE ((0x23b << 21) | (0x1 << 20) | 0x5a19)
 
 static uint32_t gicv5_idreg(int regoffset)
 {
Signature · 1 line
2.56.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Zenghui Yu

The GICv5 spec says bits [31:21] of IRS_DEVARCH are 0x23b. We wrongly shifted it by 31 instead of 21, so guests read 0x80105a19 rather than 0x47705a19.

Fixes 22232793ecb8 ("hw/intc/arm_gicv5: Implement CoreSight ID registers")
---
  hw/intc/arm_gicv5.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
#2 lore raw
In reply to Zenghui Yu
Quoted 7 lines · Zenghui Yu

The GICv5 spec says bits [31:21] of IRS_DEVARCH are 0x23b. We wrongly shifted it by 31 instead of 21, so guests read 0x80105a19 rather than 0x47705a19.

Fixes 22232793ecb8 ("hw/intc/arm_gicv5: Implement CoreSight ID registers")

Whoops; thanks for the patch, applied to target-arm.next.

-- PMM