mbox series

[0/2] tcg/s390x: Fix chacha20-s390

Message ID 20240117213646.159697-1-richard.henderson@linaro.org
Headers show
Series tcg/s390x: Fix chacha20-s390 | expand

Message

Richard Henderson Jan. 17, 2024, 9:36 p.m. UTC
So it turns out the regression exposed by "Optimize env memory operations"
is caused by an s390x host encoding error.  This is the first time that we
have had sufficient register pressure to use more than a few vector
registers at the same time.

As such, the testcase itself is interesting, since nothing else in our
testsuite generates translation blocks with quite so many vector insns
with more than 16 simultaneously live values.


r~


Richard Henderson (2):
  tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns
  tests/tcg/s390x: Import linux tools/testing/crypto/chacha20-s390

 tests/tcg/s390x/chacha.c        | 341 ++++++++++++
 tcg/s390x/tcg-target.c.inc      |   6 +-
 tests/tcg/s390x/Makefile.target |   4 +
 tests/tcg/s390x/chacha-vx.S     | 914 ++++++++++++++++++++++++++++++++
 4 files changed, 1262 insertions(+), 3 deletions(-)
 create mode 100644 tests/tcg/s390x/chacha.c
 create mode 100644 tests/tcg/s390x/chacha-vx.S

Comments

Michael Tokarev Jan. 18, 2024, 6:07 a.m. UTC | #1
18.01.2024 00:36, Richard Henderson:
> So it turns out the regression exposed by "Optimize env memory operations"
> is caused by an s390x host encoding error.  This is the first time that we
> have had sufficient register pressure to use more than a few vector
> registers at the same time.
> 
> As such, the testcase itself is interesting, since nothing else in our
> testsuite generates translation blocks with quite so many vector insns
> with more than 16 simultaneously live values.

Tested-by: Michael Tokarev <mjt@tls.msk.ru>

Both changes - the fix and the testsuite.  With several (debian) kernels on
actual s390x hw and on a few other architectures as well.

Why the problem didn't occur on non-s390x *host*?  As I noted in my initial
email, the testcase worked on amd64 host but not on s390x host..

Thank you for the good work Richard!

/mjt
Richard Henderson Jan. 18, 2024, 7:03 a.m. UTC | #2
On 1/18/24 17:07, Michael Tokarev wrote:
> Why the problem didn't occur on non-s390x *host*?  As I noted in my initial
> email, the testcase worked on amd64 host but not on s390x host..

Because the error was in the s390x host tcg backend.


r~