Developed while working on: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg05133.html Only the basics for MSA instructions are tested (basically everything QEMU also implements), but no real en/decryption. All tests seem to pass under KVM. For TCG, only the usual low address protection tests fail. To run under TCG, the feature have to be enabled explicitly for now: ./s390x-run s390x/emulator.elf \ -cpu qemu,msa-base=on,msa3-base=on,msa4-base=on,msa5-base=on,stfle=on David Hildenbrand (5): s390x: add a test case for the ipm + spm instructions s390x: add cpacf.h from Linux s390x: make sure cpacf.h can be used s390x: query and store STFL(E) facilitites s390x: test for various MSA instructions lib/s390x/asm/cpacf.h | 472 +++++++++++++++++++++++++++++++++++++++++++++++ lib/s390x/asm/facility.h | 48 +++++ lib/s390x/io.c | 3 + s390x/Makefile | 1 + s390x/emulator.c | 292 +++++++++++++++++++++++++++++ s390x/unittests.cfg | 3 + 6 files changed, 819 insertions(+) create mode 100644 lib/s390x/asm/cpacf.h create mode 100644 lib/s390x/asm/facility.h create mode 100644 s390x/emulator.c -- 2.13.5