Skip to contentSkip to conversation

hw/arm/smmuv3: Fix up L1STD_SPAN decoding

PATCH Applied Kunkun Jiang 3 participants 4 messages Nov 24, 2020 – Nov 30, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/arm/smmuv3: Fix up L1STD_SPAN decoding

Accroding to the SMMUv3 spec, the SPAN field of Level1 Stream Table Descriptor is 5 bits([4:0]).

Fixes 9bde7f0674f(hw/arm/smmuv3: Implement translate callback)
---
 hw/arm/smmuv3-internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/smmuv3-internal.h +1 -1
index fa3c088972..b6f7e53b7c 100644
@@ -633,6 +633,6 @@ static inline uint64_t l1std_l2ptr(STEDesc *desc)
     return hi << 32 | lo;
 }
 
-#define L1STD_SPAN(stm) (extract32((stm)->word[0], 0, 4))
+#define L1STD_SPAN(stm) (extract32((stm)->word[0], 0, 5))
 
 #endif
Signature · 1 line
2.23.0
#1 lore raw

Hi Eric,

Friendly ping... :)

Quoted 14 lines · Kunkun Jiang

Accroding to the SMMUv3 spec, the SPAN field of Level1 Stream Table Descriptor is 5 bits([4:0]).

Fixes 9bde7f0674f(hw/arm/smmuv3: Implement translate callback)
---
  hw/arm/smmuv3-internal.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/smmuv3-internal.h +0 -0
index fa3c088972..b6f7e53b7c 100644

hw/arm/smmuv3-internal.h static inline uint64_t l1std_l2ptr(STEDesc *desc) · line 638

Quoted 7 lines
hw/arm/smmuv3-internal.h +1 -1
@@ -633,6 +633,6 @@ static inline uint64_t l1std_l2ptr(STEDesc *desc)
      return hi << 32 | lo;
  }
 
-#define L1STD_SPAN(stm) (extract32((stm)->word[0], 0, 4))
+#define L1STD_SPAN(stm) (extract32((stm)->word[0], 0, 5))
 
  #endif

Thanks,

Kunkun Jiang

Acked-by
#3 lore raw

Hi Kunkun, Peter,

Quoted 8 lines · Peter Maydell
Quoted 7 lines · Kunkun Jiang

Accroding to the SMMUv3 spec, the SPAN field of Level1 Stream Table Descriptor is 5 bits([4:0]).

Fixes 9bde7f0674f(hw/arm/smmuv3: Implement translate callback)

---

Quoted 3 lines

Applied to target-arm.next for 6.0, thanks.

thanks and sorry for the delay

Eric

Quoted 3 lines

-- PMM