Skip to contentSkip to conversation

s390x/css: Fix css stsch detection to go beyond 8192 devices

PATCH Applied Christian Borntraeger 4 participants 5 messages Aug 14 – Aug 20

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390x/css: Fix css stsch detection to go beyond 8192 devices

From: Christian Borntraeger <[email protected]>

find_last_bit expects a size in bits and not in words. the calculation limits the number of guest devices to 8192. This probably does not matter in reality, its wrong anyway.

Fixes df1fe5bb49241 ("s390: Virtual channel subsystem support")
---
 hw/s390x/css.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
hw/s390x/css.c +1 -2
index 3a67b670531..76dbca3bb96 100644
@@ -2023,8 +2023,7 @@ bool css_schid_final(int m, uint8_t cssid, uint8_t ssid, uint16_t schid)
         return true;
     }
     set = channel_subsys.css[real_cssid]->sch_set[ssid];
-    return schid > find_last_bit(set->schids_used,
-                                 (MAX_SCHID + 1) / sizeof(unsigned long));
+    return schid > find_last_bit(set->schids_used, (MAX_SCHID + 1));
 }
 
 unsigned int css_find_free_chpid(uint8_t cssid)
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Christian Borntraeger

From: Christian Borntraeger <[email protected]>

find_last_bit expects a size in bits and not in words. the calculation limits the number of guest devices to 8192. This probably does not matter in reality, its wrong anyway.

Fixes df1fe5bb49241 ("s390: Virtual channel subsystem support")
---
  hw/s390x/css.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Christian Borntraeger
Quoted 8 lines · Christian Borntraeger

From: Christian Borntraeger <[email protected]>

find_last_bit expects a size in bits and not in words. the calculation limits the number of guest devices to 8192. This probably does not matter in reality, its wrong anyway.

Fixes df1fe5bb49241 ("s390: Virtual channel subsystem support")
Applied
#3 lore raw
In reply to Christian Borntraeger
Quoted 11 lines · Christian Borntraeger

From: Christian Borntraeger <[email protected]>

find_last_bit expects a size in bits and not in words. the calculation limits the number of guest devices to 8192. This probably does not matter in reality, its wrong anyway.

Fixes df1fe5bb49241 ("s390: Virtual channel subsystem support")
---
  hw/s390x/css.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

Thanks! Applied for 11.2

#4 lore raw
Quoted 9 lines · Eric Farman
Quoted 6 lines · Christian Borntraeger

From: Christian Borntraeger <[email protected]>

find_last_bit expects a size in bits and not in words. the calculation limits the number of guest devices to 8192.  This probably does not matter in reality, its wrong anyway.

Quoted 8 lines
Quoted 5 lines
Fixes df1fe5bb49241 ("s390: Virtual channel subsystem support")

---
  hw/s390x/css.c | 3 +--

  1 file changed, 1 insertion(+), 2 deletions(-)

Thanks! Applied for 11.2