crypto/aes-helpers.c | 106 +++ crypto/meson.build | 1 + docs/system/s390x/cpacf.rst | 143 ++++ docs/system/target-s390x.rst | 1 + hw/s390x/ipl.c | 48 +- hw/s390x/ipl.h | 2 + hw/s390x/s390-pci-inst.c | 5 +- include/crypto/aes-helpers.h | 109 +++ include/hw/s390x/ipl/qipl.h | 15 +- pc-bios/s390-ccw.img | Bin 112408 -> 112408 bytes pc-bios/s390-ccw/clp.c | 4 + pc-bios/s390-ccw/main.c | 19 +- pc-bios/s390-ccw/virtio-blkdev.c | 1 - pc-bios/s390-ccw/virtio-ccw.c | 17 - pc-bios/s390-ccw/virtio-ccw.h | 1 - pc-bios/s390-ccw/virtio-pci.c | 31 +- pc-bios/s390-ccw/virtio-scsi.c | 18 +- pc-bios/s390-ccw/virtio.c | 21 +- target/s390x/gen-features.c | 31 + target/s390x/tcg/cpacf-arch.h | 251 ++++++ target/s390x/tcg/cpacf.h | 63 ++ target/s390x/tcg/cpacf_aes.c | 986 ++++++++++++++++++++++ target/s390x/tcg/cpacf_sha256.c | 197 +++++ target/s390x/tcg/cpacf_sha512.c | 211 +++++ target/s390x/tcg/crypto_helper.c | 445 +++++----- target/s390x/tcg/crypto_helper.h | 100 +++ target/s390x/tcg/insn-data.h.inc | 3 +- target/s390x/tcg/meson.build | 3 + target/s390x/tcg/translate.c | 16 +- tests/functional/s390x/test_secure_ipl.py | 157 +++- tests/qtest/cdrom-test.c | 8 + tests/tcg/s390x/cpacf-kdsa.c | 58 ++ tests/tcg/s390x/cpacf-kimd.c | 166 ++++ tests/tcg/s390x/cpacf-klmd.c | 206 +++++ tests/tcg/s390x/cpacf-km.c | 590 +++++++++++++ tests/tcg/s390x/cpacf-kmac.c | 58 ++ tests/tcg/s390x/cpacf-kmc.c | 351 ++++++++ tests/tcg/s390x/cpacf-kmctr.c | 360 ++++++++ tests/tcg/s390x/cpacf-pcc.c | 245 ++++++ tests/tcg/s390x/cpacf-pckmo.c | 45 + tests/tcg/s390x/cpacf-prno.c | 131 +++ tests/tcg/s390x/cpacf.h | 570 +++++++++++++ tests/tcg/s390x/meson.build | 10 + 43 files changed, 5487 insertions(+), 316 deletions(-) create mode 100644 crypto/aes-helpers.c create mode 100644 docs/system/s390x/cpacf.rst create mode 100644 include/crypto/aes-helpers.h create mode 100644 target/s390x/tcg/cpacf-arch.h create mode 100644 target/s390x/tcg/cpacf.h create mode 100644 target/s390x/tcg/cpacf_aes.c create mode 100644 target/s390x/tcg/cpacf_sha256.c create mode 100644 target/s390x/tcg/cpacf_sha512.c create mode 100644 target/s390x/tcg/crypto_helper.h create mode 100644 tests/tcg/s390x/cpacf-kdsa.c create mode 100644 tests/tcg/s390x/cpacf-kimd.c create mode 100644 tests/tcg/s390x/cpacf-klmd.c create mode 100644 tests/tcg/s390x/cpacf-km.c create mode 100644 tests/tcg/s390x/cpacf-kmac.c create mode 100644 tests/tcg/s390x/cpacf-kmc.c create mode 100644 tests/tcg/s390x/cpacf-kmctr.c create mode 100644 tests/tcg/s390x/cpacf-pcc.c create mode 100644 tests/tcg/s390x/cpacf-pckmo.c create mode 100644 tests/tcg/s390x/cpacf-prno.c create mode 100644 tests/tcg/s390x/cpacf.h