Skip to content

s390x/tcg: Vector Instruction Support Part 4

David Hildenbrand qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest22 patches 11 repliesIn review
  2. v123 patches 37 repliesSuperseded

Changes in v2 from the cover letter

- get rid of make_float64() and float64_val().
- fixed two cc calculation issues (thanks Richard)
- Rework "VECTOR FP COMPARE (EQUAL|HIGH|HIGH OR EQUAL)"
- Rework "VECTOR FP MULTIPLY AND (ADD|SUBTRACT)"
- Use gvec expansion in "s390x/tcg: Implement VECTOR FP PERFORM SIGN OPERATION"

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22s390x/tcg: Store only the necessary amount of doublewords for STFLEtarget/s390x/misc_helper.c+7 -11 reply
2/22s390x/tcg: Introduce tcg_s390_vector_exception()target/s390x/cpu.h target/s390x/excp_helper.c target/s390x/tcg_s390x.h+18 -00 replies
3/22s390x/tcg: Export float_comp_to_cc() and float(32|64|128)_dcmask()target/s390x/fpu_helper.c target/s390x/internal.h+6 -21 reply
4/22s390x/tcg: Implement VECTOR FP ADDtarget/s390x/Makefile.objs target/s390x/helper.h target/s390x/insn-data.def +2 more+158 -00 replies
5/22s390x/tcg: Implement VECTOR FP COMPARE (AND SIGNAL) SCALARtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+59 -00 replies
6/22s390x/tcg: Implement VECTOR FP COMPARE (EQUAL|HIGH|HIGH OR EQUAL)target/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+173 -02 replies
7/22s390x/tcg: Implement VECTOR FP CONVERT FROM FIXED 64-BITtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+76 -00 replies
8/22s390x/tcg: Implement VECTOR FP CONVERT FROM LOGICAL 64-BITtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+30 -00 replies
9/22s390x/tcg: Implement VECTOR FP CONVERT TO FIXED 64-BITtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+30 -00 replies
10/22s390x/tcg: Implement VECTOR FP CONVERT TO LOGICAL 64-BITtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+30 -00 replies
11/22s390x/tcg: Implement VECTOR FP DIVIDEtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+24 -00 replies
12/22s390x/tcg: Implement VECTOR LOAD FP INTEGERtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+30 -00 replies
13/22s390x/tcg: Implement VECTOR LOAD LENGTHENEDtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+58 -00 replies
14/22s390x/tcg: Implement VECTOR LOAD ROUNDEDtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+50 -00 replies
15/22s390x/tcg: Implement VECTOR FP MULTIPLYtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+24 -00 replies
16/22s390x/tcg: Implement VECTOR FP MULTIPLY AND (ADD|SUBTRACT)target/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+79 -01 reply
17/22s390x/tcg: Implement VECTOR FP PERFORM SIGN OPERATIONtarget/s390x/insn-data.def target/s390x/translate_vx.inc.c+54 -01 reply
18/22s390x/tcg: Implement VECTOR FP SQUARE ROOTtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+40 -00 replies
19/22s390x/tcg: Implement VECTOR FP SUBTRACTtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+24 -00 replies
20/22s390x/tcg: Implement VECTOR FP TEST DATA CLASS IMMEDIATEtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/translate_vx.inc.c +1 more+62 -00 replies
21/22s390x/tcg: Allow linux-user to use vector instructionstarget/s390x/cpu.c+3 -03 replies
22/22s390x/tcg: We support the Vector Facilitytarget/s390x/gen-features.c+1 -00 replies

Reviews trailers per patch

21 of 22 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRichard HendersonLaurent Vivier
SeriesR-b
1/22R-b
2/22
3/22R-b
4/22R-b
5/22R-b
6/22R-b
7/22R-b
8/22R-b
9/22R-b
10/22R-b
11/22R-b
12/22R-b
13/22R-b
14/22R-b
15/22R-b
16/22R-b
17/22R-b
18/22R-b
19/22R-b
20/22R-b
21/22R-b R-b
22/22R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 00/22] s390x/tcg: Vector Instruction Support Part 4

This is the final part of vector instruction support for s390x.

Part 1: Vector Support Instructions
Part 2: Vector Integer Instructions
Part 3: Vector String Instructions
Part 4: Vector Floating-Point Instructions

The current state can be found at (kept updated):
https://github.com/davidhildenbrand/qemu/tree/vx

It is based on:
- [PATCH v2 0/5] s390x/tcg: Vector Instruction Support Part 3
- [PATCH v1 0/2] s390x: Fix vector register alignment

With the current state I can boot Linux kernel + user space compiled with SIMD support. This allows to boot distributions compiled exclusively for z13, requiring SIMD support. Also, it is now possible to build a complete kernel using rpmbuild as quite some issues have been sorted out.

While the current state works fine for me with RHEL 8, I am experiencing some issues with newer userspace versions. I already found and fixed some stack overflow protection issues (stfle instruction). I still see random rpm database corruptions and rpmbuild doesn't work correctly (looks like another stack protection issue).

In this part, all Vector Floating-Point Instructions introduced with the "Vector Facility" are added. Also, the "qemu" model is changed to a z13 machine.

v1 -> v2:
- get rid of make_float64() and float64_val().
- fixed two cc calculation issues (thanks Richard)
- Rework "VECTOR FP COMPARE (EQUAL|HIGH|HIGH OR EQUAL)"
- Rework "VECTOR FP MULTIPLY AND (ADD|SUBTRACT)"
- Use gvec expansion in "s390x/tcg: Implement VECTOR FP PERFORM SIGN OPERATION"

Cc Denys Vlasenko <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Pino Toscano <[email protected]>

David Hildenbrand (22):
s390x/tcg: Store only the necessary amount of doublewords for STFLE s390x/tcg: Introduce tcg_s390_vector_exception() s390x/tcg: Export float_comp_to_cc() and float(32|64|128)_dcmask() s390x/tcg: Implement VECTOR FP ADD
s390x/tcg: Implement VECTOR FP COMPARE (AND SIGNAL) SCALAR s390x/tcg: Implement VECTOR FP COMPARE (EQUAL|HIGH|HIGH OR EQUAL) s390x/tcg: Implement VECTOR FP CONVERT FROM FIXED 64-BIT s390x/tcg: Implement VECTOR FP CONVERT FROM LOGICAL 64-BIT s390x/tcg: Implement VECTOR FP CONVERT TO FIXED 64-BIT s390x/tcg: Implement VECTOR FP CONVERT TO LOGICAL 64-BIT s390x/tcg: Implement VECTOR FP DIVIDE
s390x/tcg: Implement VECTOR LOAD FP INTEGER
s390x/tcg: Implement VECTOR LOAD LENGTHENED
s390x/tcg: Implement VECTOR LOAD ROUNDED
s390x/tcg: Implement VECTOR FP MULTIPLY
s390x/tcg: Implement VECTOR FP MULTIPLY AND (ADD|SUBTRACT) s390x/tcg: Implement VECTOR FP PERFORM SIGN OPERATION s390x/tcg: Implement VECTOR FP SQUARE ROOT
s390x/tcg: Implement VECTOR FP SUBTRACT
s390x/tcg: Implement VECTOR FP TEST DATA CLASS IMMEDIATE s390x/tcg: Allow linux-user to use vector instructions s390x/tcg: We support the Vector Facility

 target/s390x/Makefile.objs      |   1 +
 target/s390x/cpu.c              |   3 +
 target/s390x/cpu.h              |   1 +
 target/s390x/excp_helper.c      |  15 +
 target/s390x/fpu_helper.c       |   4 +-
 target/s390x/gen-features.c     |   1 +
 target/s390x/helper.h           |  46 +++
 target/s390x/insn-data.def      |  45 +++
 target/s390x/internal.h         |   4 +
 target/s390x/misc_helper.c      |   8 +-
 target/s390x/tcg_s390x.h        |   2 +
 target/s390x/translate_vx.inc.c | 284 +++++++++++++++
 target/s390x/vec_fpu_helper.c   | 625 ++++++++++++++++++++++++++++++++
 13 files changed, 1036 insertions(+), 3 deletions(-)
 create mode 100644 target/s390x/vec_fpu_helper.c
Signature · 1 line
2.21.0