target/s390x: implement mvcos instruction
commit3e7e5e0bc10d32d7cc41d0a39113473a3abfc657
authorDavid Hildenbrand <david@redhat.com>
Wed, 14 Jun 2017 13:38:19 +0000 (14 15:38 +0200)
committerRichard Henderson <rth@twiddle.net>
Fri, 23 Jun 2017 15:40:46 +0000 (23 08:40 -0700)
treed5385e9f8fdea4de9663176ddc0eb14298a6f2fa
parentc8bd95377babc3bd60f86cb3e5b24e74097cf6a9
target/s390x: implement mvcos instruction

This adds support for the MOVE WITH OPTIONAL SPECIFICATIONS (MVCOS)
instruction. Allow to enable it for the qemu cpu model using

qemu-system-s390x ... -cpu qemu,mvcos=on ...

This allows to boot linux kernel that uses it for uacccess.

We are missing (as for most other part) low address protection checks,
PSW key / storage key checks and support for AR-mode.

We fake an ADDRESSING exception when called from problem state (which
seems to rely on PSW key checks to be in place) and if AR-mode is used.
user mode will always see a PRIVILEDGED exception.

This patch is based on an original patch by Miroslav Benes (thanks!).

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170614133819.18480-3-david@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
target/s390x/cpu.h
target/s390x/cpu_models.c
target/s390x/helper.h
target/s390x/insn-data.def
target/s390x/mem_helper.c
target/s390x/translate.c