Skip to contentSkip to conversation

s390x/tcg: Fix m5 vs. m4 field for VECTOR MULTIPLY SUM LOGICAL

PATCH Applied David Hildenbrand 3 participants 4 messages Jul 5, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390x/tcg: Fix m5 vs. m4 field for VECTOR MULTIPLY SUM LOGICAL

The element size is located in m5, not in m4. As there is no m4, qemu currently crashes with an assertion, trying to lookup that field.

Reproduced and tested via GO, which ends up using VMSL once the Vector enhancements facility is around for verifying certificates with elliptic curves.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/449

---
 target/s390x/translate_vx.c.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/s390x/translate_vx.c.inc +1 -1
index a9d51b1f4c..0afa46e463 100644
@@ -1783,7 +1783,7 @@ static DisasJumpType op_vmsl(DisasContext *s, DisasOps *o)
 {
     TCGv_i64 l1, h1, l2, h2;
 
-    if (get_field(s, m4) != ES_64) {
+    if (get_field(s, m5) != ES_64) {
         gen_program_exception(s, PGM_SPECIFICATION);
         return DISAS_NORETURN;
     }
Signature · 1 line
2.31.1
#1 lore raw
Quoted 10 lines · David Hildenbrand

The element size is located in m5, not in m4. As there is no m4, qemu currently crashes with an assertion, trying to lookup that field.

Reproduced and tested via GO, which ends up using VMSL once the Vector enhancements facility is around for verifying certificates with elliptic curves.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/449

Forgot to add

Fixes 8c18fa5b3eba ("s390x/tcg: Implement VECTOR MULTIPLY SUM LOGICAL")
Signature · 3 lines
Thanks,

David / dhildenb
Reviewed-by on v1 1/1
#2 lore raw
In reply to David Hildenbrand
Quoted 19 lines · David Hildenbrand

The element size is located in m5, not in m4. As there is no m4, qemu currently crashes with an assertion, trying to lookup that field.

Reproduced and tested via GO, which ends up using VMSL once the Vector enhancements facility is around for verifying certificates with elliptic curves.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/449

---
  target/s390x/translate_vx.c.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
target/s390x/translate_vx.c.inc +0 -0
index a9d51b1f4c..0afa46e463 100644

target/s390x/translate_vx.c.inc static DisasJumpType op_vmsl(DisasContext *s, DisasOps *o) · line 1789

Quoted 8 lines
target/s390x/translate_vx.c.inc +1 -1
@@ -1783,7 +1783,7 @@ static DisasJumpType op_vmsl(DisasContext *s, DisasOps *o)
  {
      TCGv_i64 l1, h1, l2, h2;
 
-    if (get_field(s, m4) != ES_64) {
+    if (get_field(s, m5) != ES_64) {
          gen_program_exception(s, PGM_SPECIFICATION);
          return DISAS_NORETURN;
      }

Looks right.

#3 lore raw
In reply to David Hildenbrand
Quoted 7 lines · David Hildenbrand

The element size is located in m5, not in m4. As there is no m4, qemu currently crashes with an assertion, trying to lookup that field.

Reproduced and tested via GO, which ends up using VMSL once the Vector enhancements facility is around for verifying certificates with elliptic curves.

Quoted 6 lines

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/449

---
 target/s390x/translate_vx.c.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied.