This allows botting a recent linux kernel (e.g. compiled for z900) and using mvcos for uaccess:
qemu-system-s390x ... -cpu qemu,mvcos=on ... While at it, correctly fake its abscence. Signed-off-by: David Hildenbrand <da...@redhat.com> --- target/s390x/cpu_models.c | 1 + target/s390x/mem_helper.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index c508ae1..348e760 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -682,6 +682,7 @@ static void add_qemu_cpu_model_features(S390FeatBitmap fbm) S390_FEAT_LONG_DISPLACEMENT_FAST, S390_FEAT_ETF2_ENH, S390_FEAT_STORE_CLOCK_FAST, + S390_FEAT_MOVE_WITH_OPTIONAL_SPEC, S390_FEAT_GENERAL_INSTRUCTIONS_EXT, S390_FEAT_EXECUTE_EXT, S390_FEAT_STFLE_45, diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index cb27465..e0a5de0 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -1508,6 +1508,9 @@ uint32_t HELPER(mvcos)(CPUS390XState *env, uint64_t dest, uint64_t src, HELPER_LOG("%s dest %" PRIx64 ", src %" PRIx64 ", len %" PRIx64 "\n", __func__, dest, src, len); + if (!s390_has_feat(S390_FEAT_MOVE_WITH_OPTIONAL_SPEC)) { + program_interrupt(env, PGM_OPERATION, 6); + } if (!(env->psw.mask & PSW_MASK_DAT)) { program_interrupt(env, PGM_SPECIAL_OP, 6); } -- 2.9.3