s390x update for softfreeze
The following changes since commit 9aef0954195cc592e86846dbbe7f3c2c5603690a:
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-07-06 11:24:58 +0100)
are available in the Git repository at:
https://gitlab.com/cohuck/qemu.git tags/s390x-20210708
for you to fetch changes up to 7ab3eb42b0d795f7321c4fca0ea06cb76a005b04:
target/s390x: split sysemu part of cpu models (2021-07-07 14:01:59 +0200)
----------------------------------------------------------------
s390x updates:
- add gen16 cpumodels
- refactor/cleanup some code
- bugfixes
----------------------------------------------------------------
Cho, Yu-Chen (14):
target/s390x: meson: add target_user_arch
hw/s390x: rename tod-qemu.c to tod-tcg.c
hw/s390x: tod: make explicit checks for accelerators when initializing hw/s390x: only build tod-tcg from the CONFIG_TCG build target/s390x: remove tcg-stub.c
target/s390x: rename internal.h to s390x-internal.h target/s390x: start moving TCG-only code to tcg/ target/s390x: move sysemu-only code out to cpu-sysemu.c target/s390x: split cpu-dump from helper.c
target/s390x: make helper.c sysemu-only
target/s390x: use kvm_enabled() to wrap call to kvm_s390_get_hpage_1m target/s390x: remove kvm-stub.c
target/s390x: move kvm files into kvm/
target/s390x: split sysemu part of cpu models
Christian Borntraeger (1):
s390x/cpumodel: add 3931 and 3932
David Hildenbrand (1):
s390x/tcg: Fix m5 vs. m4 field for VECTOR MULTIPLY SUM LOGICAL
Ulrich Weigand (1):
target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL
MAINTAINERS | 6 +-
hw/intc/s390_flic_kvm.c | 2 +-
hw/s390x/meson.build | 4 +-
hw/s390x/s390-stattrib-kvm.c | 2 +-
hw/s390x/tod-kvm.c | 2 +-
hw/s390x/{tod-qemu.c => tod-tcg.c} | 4 +-
hw/s390x/tod.c | 9 +-
hw/vfio/ap.c | 2 +-
include/hw/s390x/tod.h | 2 +-
meson.build | 1 +
target/s390x/arch_dump.c | 2 +-
target/s390x/cpu-dump.c | 134 ++++++
target/s390x/cpu-sysemu.c | 309 +++++++++++++
target/s390x/cpu.c | 332 +++-----------
target/s390x/cpu_features_def.h.inc | 5 +
target/s390x/cpu_models.c | 427 +-----------------
target/s390x/cpu_models_sysemu.c | 426 +++++++++++++++++
target/s390x/cpu_models_user.c | 20 +
target/s390x/diag.c | 7 +-
target/s390x/gdbstub.c | 2 +-
target/s390x/gen-features.c | 14 +
target/s390x/helper.c | 162 +------
target/s390x/helper.h | 24 +-
target/s390x/interrupt.c | 6 +-
target/s390x/ioinst.c | 2 +-
target/s390x/kvm-stub.c | 121 -----
target/s390x/{ => kvm}/kvm.c | 2 +-
target/s390x/{ => kvm}/kvm_s390x.h | 0
target/s390x/kvm/meson.build | 17 +
target/s390x/kvm/trace-events | 7 +
target/s390x/kvm/trace.h | 1 +
target/s390x/machine.c | 6 +-
target/s390x/meson.build | 42 +-
target/s390x/mmu_helper.c | 4 +-
target/s390x/{internal.h => s390x-internal.h} | 8 +
target/s390x/sigp.c | 2 +-
target/s390x/tcg-stub.c | 30 --
target/s390x/{ => tcg}/cc_helper.c | 2 +-
target/s390x/{ => tcg}/crypto_helper.c | 2 +-
target/s390x/{ => tcg}/excp_helper.c | 2 +-
target/s390x/{ => tcg}/fpu_helper.c | 65 ++-
target/s390x/{ => tcg}/insn-data.def | 0
target/s390x/{ => tcg}/insn-format.def | 0
target/s390x/{ => tcg}/int_helper.c | 2 +-
target/s390x/{ => tcg}/mem_helper.c | 2 +-
target/s390x/tcg/meson.build | 14 +
target/s390x/{ => tcg}/misc_helper.c | 2 +-
target/s390x/{ => tcg}/s390-tod.h | 0
target/s390x/{ => tcg}/tcg_s390x.h | 0
target/s390x/{ => tcg}/translate.c | 41 +-
target/s390x/{ => tcg}/translate_vx.c.inc | 2 +-
target/s390x/{ => tcg}/vec.h | 0
target/s390x/{ => tcg}/vec_fpu_helper.c | 2 +-
target/s390x/{ => tcg}/vec_helper.c | 2 +-
target/s390x/{ => tcg}/vec_int_helper.c | 0
target/s390x/{ => tcg}/vec_string_helper.c | 2 +-
target/s390x/trace-events | 8 +-
57 files changed, 1167 insertions(+), 1127 deletions(-)
rename hw/s390x/{tod-qemu.c => tod-tcg.c} (96%)
create mode 100644 target/s390x/cpu-dump.c
create mode 100644 target/s390x/cpu-sysemu.c
create mode 100644 target/s390x/cpu_models_sysemu.c
create mode 100644 target/s390x/cpu_models_user.c
delete mode 100644 target/s390x/kvm-stub.c
rename target/s390x/{ => kvm}/kvm.c (99%)
rename target/s390x/{ => kvm}/kvm_s390x.h (100%)
create mode 100644 target/s390x/kvm/meson.build
create mode 100644 target/s390x/kvm/trace-events
create mode 100644 target/s390x/kvm/trace.h
rename target/s390x/{internal.h => s390x-internal.h} (97%)
delete mode 100644 target/s390x/tcg-stub.c
rename target/s390x/{ => tcg}/cc_helper.c (99%)
rename target/s390x/{ => tcg}/crypto_helper.c (98%)
rename target/s390x/{ => tcg}/excp_helper.c (99%)
rename target/s390x/{ => tcg}/fpu_helper.c (93%)
rename target/s390x/{ => tcg}/insn-data.def (100%)
rename target/s390x/{ => tcg}/insn-format.def (100%)
rename target/s390x/{ => tcg}/int_helper.c (99%)
rename target/s390x/{ => tcg}/mem_helper.c (99%)
create mode 100644 target/s390x/tcg/meson.build
rename target/s390x/{ => tcg}/misc_helper.c (99%)
rename target/s390x/{ => tcg}/s390-tod.h (100%)
rename target/s390x/{ => tcg}/tcg_s390x.h (100%)
rename target/s390x/{ => tcg}/translate.c (99%)
rename target/s390x/{ => tcg}/translate_vx.c.inc (99%)
rename target/s390x/{ => tcg}/vec.h (100%)
rename target/s390x/{ => tcg}/vec_fpu_helper.c (99%)
rename target/s390x/{ => tcg}/vec_helper.c (99%)
rename target/s390x/{ => tcg}/vec_int_helper.c (100%)
rename target/s390x/{ => tcg}/vec_string_helper.c (99%)Signature · 1 line
2.31.1
[PULL 02/17] target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL
From: Ulrich Weigand <[email protected]>
The FP-to-integer conversion instructions need to set CC 3 whenever a "special case" occurs; this is the case whenever the instruction also signals the IEEE invalid exception. (See e.g. figure 19-18 in the Principles of Operation.)
However, qemu currently will set CC 3 only in the case where the input was a NaN. This is indeed one of the special cases, but there are others, most notably the case where the input is out of range of the target data type.
This patch fixes the problem by switching these instructions to the "static" CC method and computing the correct result directly in the helper. (It cannot be re-computed later as the information about the invalid exception is no longer available.)
This fixes a bug observed when running the wasmtime test suite under the s390x-linux-user target.
Message-Id: <[email protected]>
--- target/s390x/fpu_helper.c | 63 ++++++++++++++++++++++++++++++++++++--- target/s390x/helper.h | 24 +++++++-------- target/s390x/translate.c | 39 ++++++++---------------- 3 files changed, 83 insertions(+), 43 deletions(-)
target/s390x/fpu_helper.c +59 -4
@@ -168,6 +168,34 @@ uint32_t set_cc_nz_f128(float128 v) } } +/* condition codes for FP to integer conversion ops */ +static uint32_t set_cc_conv_f32 (float32 v,float_status *stat) +{ +if (stat->float_exception_flags & float_flag_invalid) { +return 3 ; + }else { +return set_cc_nz_f32 (v); + } +} + +static uint32_t set_cc_conv_f64 (float64 v,float_status *stat) +{ +if (stat->float_exception_flags & float_flag_invalid) { +return 3 ; + }else { +return set_cc_nz_f64 (v); + } +} + +static uint32_t set_cc_conv_f128 (float128 v,float_status *stat) +{ +if (stat->float_exception_flags & float_flag_invalid) { +return 3 ; + }else { +return set_cc_nz_f128 (v); + } +} +static inline uint8_t round_from_m34 (uint32_t m34) {return extract32 (m34,0 ,4 );
@@ -506,9 +534,11 @@ uint64_t HELPER(cgeb)(CPUS390XState *env, uint64_t v2, uint32_t m34) {int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34));int64_t ret =float32_to_int64 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f32 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); + env->cc_op = cc;if (float32_is_any_nan (v2)) {return INT64_MIN ; }
@@ -520,9 +550,11 @@ uint64_t HELPER(cgdb)(CPUS390XState *env, uint64_t v2, uint32_t m34) {int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34));int64_t ret =float64_to_int64 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f64 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); + env->cc_op = cc;if (float64_is_any_nan (v2)) {return INT64_MIN ; }
@@ -535,9 +567,11 @@ uint64_t HELPER(cgxb)(CPUS390XState *env, uint64_t h, uint64_t l, uint32_t m34)int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34));float128 v2 =make_float128 (h, l);int64_t ret =float128_to_int64 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f128 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); + env->cc_op = cc;if (float128_is_any_nan (v2)) {return INT64_MIN ; }
@@ -549,9 +583,11 @@ uint64_t HELPER(cfeb)(CPUS390XState *env, uint64_t v2, uint32_t m34) {int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34));int32_t ret =float32_to_int32 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f32 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); + env->cc_op = cc;if (float32_is_any_nan (v2)) {return INT32_MIN ; }
@@ -563,9 +599,11 @@ uint64_t HELPER(cfdb)(CPUS390XState *env, uint64_t v2, uint32_t m34) {int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34));int32_t ret =float64_to_int32 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f64 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); + env->cc_op = cc;if (float64_is_any_nan (v2)) {return INT32_MIN ; }
@@ -578,9 +616,11 @@ uint64_t HELPER(cfxb)(CPUS390XState *env, uint64_t h, uint64_t l, uint32_t m34)int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34));float128 v2 =make_float128 (h, l);int32_t ret =float128_to_int32 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f128 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); + env->cc_op = cc;if (float128_is_any_nan (v2)) {return INT32_MIN ; }
@@ -592,8 +632,11 @@ uint64_t HELPER(clgeb)(CPUS390XState *env, uint64_t v2, uint32_t m34) {int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34));uint64_t ret =float32_to_uint64 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f32 (v2, &env->fpu_status); +s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); + env->cc_op = cc;if (float32_is_any_nan (v2)) {return 0 ; }
@@ -605,9 +648,11 @@ uint64_t HELPER(clgdb)(CPUS390XState *env, uint64_t v2, uint32_t m34) {int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34));uint64_t ret =float64_to_uint64 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f64 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); + env->cc_op = cc;if (float64_is_any_nan (v2)) {return 0 ; }
@@ -618,11 +663,14 @@ uint64_t HELPER(clgdb)(CPUS390XState *env, uint64_t v2, uint32_t m34)uint64_t HELPER (clgxb )(CPUS390XState *env,uint64_t h,uint64_t l,uint32_t m34) {int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34)); -uint64_t ret =float128_to_uint64 (make_float128 (h, l), &env->fpu_status); +float128 v2 =make_float128 (h, l); +uint64_t ret =float128_to_uint64 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f128 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); -if (float128_is_any_nan (make_float128 (h, l))) { + env->cc_op = cc; +if (float128_is_any_nan (v2)) {return 0 ; }return ret;
@@ -633,9 +681,11 @@ uint64_t HELPER(clfeb)(CPUS390XState *env, uint64_t v2, uint32_t m34) {int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34));uint32_t ret =float32_to_uint32 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f32 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); + env->cc_op = cc;if (float32_is_any_nan (v2)) {return 0 ; }
@@ -647,9 +697,11 @@ uint64_t HELPER(clfdb)(CPUS390XState *env, uint64_t v2, uint32_t m34) {int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34));uint32_t ret =float64_to_uint32 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f64 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); + env->cc_op = cc;if (float64_is_any_nan (v2)) {return 0 ; }
@@ -660,11 +712,14 @@ uint64_t HELPER(clfdb)(CPUS390XState *env, uint64_t v2, uint32_t m34)uint64_t HELPER (clfxb )(CPUS390XState *env,uint64_t h,uint64_t l,uint32_t m34) {int old_mode =s390_swap_bfp_rounding_mode (env,round_from_m34 (m34)); -uint32_t ret =float128_to_uint32 (make_float128 (h, l), &env->fpu_status); +float128 v2 =make_float128 (h, l); +uint32_t ret =float128_to_uint32 (v2, &env->fpu_status); +uint32_t cc =set_cc_conv_f128 (v2, &env->fpu_status);s390_restore_bfp_rounding_mode (env, old_mode);handle_exceptions (env,xxc_from_m34 (m34),GETPC ()); -if (float128_is_any_nan (make_float128 (h, l))) { + env->cc_op = cc; +if (float128_is_any_nan (v2)) {return 0 ; }return ret;
target/s390x/helper.h +12 -12
@@ -64,18 +64,18 @@ DEF_HELPER_FLAGS_5(cxb, TCG_CALL_NO_WG_SE, i32, env, i64, i64, i64, i64) DEF_HELPER_FLAGS_3(keb, TCG_CALL_NO_WG, i32, env, i64, i64) DEF_HELPER_FLAGS_3(kdb, TCG_CALL_NO_WG, i32, env, i64, i64) DEF_HELPER_FLAGS_5(kxb, TCG_CALL_NO_WG, i32, env, i64, i64, i64, i64) -DEF_HELPER_FLAGS_3(cgeb, TCG_CALL_NO_WG, i64, env, i64, i32) -DEF_HELPER_FLAGS_3(cgdb, TCG_CALL_NO_WG, i64, env, i64, i32) -DEF_HELPER_FLAGS_4(cgxb, TCG_CALL_NO_WG, i64, env, i64, i64, i32) -DEF_HELPER_FLAGS_3(cfeb, TCG_CALL_NO_WG, i64, env, i64, i32) -DEF_HELPER_FLAGS_3(cfdb, TCG_CALL_NO_WG, i64, env, i64, i32) -DEF_HELPER_FLAGS_4(cfxb, TCG_CALL_NO_WG, i64, env, i64, i64, i32) -DEF_HELPER_FLAGS_3(clgeb, TCG_CALL_NO_WG, i64, env, i64, i32) -DEF_HELPER_FLAGS_3(clgdb, TCG_CALL_NO_WG, i64, env, i64, i32) -DEF_HELPER_FLAGS_4(clgxb, TCG_CALL_NO_WG, i64, env, i64, i64, i32) -DEF_HELPER_FLAGS_3(clfeb, TCG_CALL_NO_WG, i64, env, i64, i32) -DEF_HELPER_FLAGS_3(clfdb, TCG_CALL_NO_WG, i64, env, i64, i32) -DEF_HELPER_FLAGS_4(clfxb, TCG_CALL_NO_WG, i64, env, i64, i64, i32) +DEF_HELPER_3(cgeb, i64, env, i64, i32) +DEF_HELPER_3(cgdb, i64, env, i64, i32) +DEF_HELPER_4(cgxb, i64, env, i64, i64, i32) +DEF_HELPER_3(cfeb, i64, env, i64, i32) +DEF_HELPER_3(cfdb, i64, env, i64, i32) +DEF_HELPER_4(cfxb, i64, env, i64, i64, i32) +DEF_HELPER_3(clgeb, i64, env, i64, i32) +DEF_HELPER_3(clgdb, i64, env, i64, i32) +DEF_HELPER_4(clgxb, i64, env, i64, i64, i32) +DEF_HELPER_3(clfeb, i64, env, i64, i32) +DEF_HELPER_3(clfdb, i64, env, i64, i32) +DEF_HELPER_4(clfxb, i64, env, i64, i64, i32) DEF_HELPER_FLAGS_3(fieb, TCG_CALL_NO_WG, i64, env, i64, i32) DEF_HELPER_FLAGS_3(fidb, TCG_CALL_NO_WG, i64, env, i64, i32)DEF_HELPER_FLAGS_4 (fixb,TCG_CALL_NO_WG , i64, env, i64, i64, i32)
target/s390x/translate.c +12 -27
@@ -563,21 +563,6 @@ static void set_cc_nz_u64(DisasContext *s, TCGv_i64 val)gen_op_update1_cc_i64 (s,CC_OP_NZ , val); } -static void gen_set_cc_nz_f32 (DisasContext *s,TCGv_i64 val) -{ -gen_op_update1_cc_i64 (s,CC_OP_NZ_F32 , val); -} - -static void gen_set_cc_nz_f64 (DisasContext *s,TCGv_i64 val) -{ -gen_op_update1_cc_i64 (s,CC_OP_NZ_F64 , val); -} - -static void gen_set_cc_nz_f128 (DisasContext *s,TCGv_i64 vh,TCGv_i64 vl) -{ -gen_op_update2_cc_i64 (s,CC_OP_NZ_F128 , vh, vl); -} -/* CC value is in env->cc_op */ static void set_cc_static (DisasContext *s) {
@@ -1836,7 +1821,7 @@ static DisasJumpType op_cfeb(DisasContext *s, DisasOps *o) }gen_helper_cfeb (o->out, cpu_env, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f32 (s, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1849,7 +1834,7 @@ static DisasJumpType op_cfdb(DisasContext *s, DisasOps *o) }gen_helper_cfdb (o->out, cpu_env, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f64 (s, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1862,7 +1847,7 @@ static DisasJumpType op_cfxb(DisasContext *s, DisasOps *o) }gen_helper_cfxb (o->out, cpu_env, o->in1, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f128 (s, o->in1, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1875,7 +1860,7 @@ static DisasJumpType op_cgeb(DisasContext *s, DisasOps *o) }gen_helper_cgeb (o->out, cpu_env, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f32 (s, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1888,7 +1873,7 @@ static DisasJumpType op_cgdb(DisasContext *s, DisasOps *o) }gen_helper_cgdb (o->out, cpu_env, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f64 (s, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1901,7 +1886,7 @@ static DisasJumpType op_cgxb(DisasContext *s, DisasOps *o) }gen_helper_cgxb (o->out, cpu_env, o->in1, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f128 (s, o->in1, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1914,7 +1899,7 @@ static DisasJumpType op_clfeb(DisasContext *s, DisasOps *o) }gen_helper_clfeb (o->out, cpu_env, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f32 (s, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1927,7 +1912,7 @@ static DisasJumpType op_clfdb(DisasContext *s, DisasOps *o) }gen_helper_clfdb (o->out, cpu_env, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f64 (s, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1940,7 +1925,7 @@ static DisasJumpType op_clfxb(DisasContext *s, DisasOps *o) }gen_helper_clfxb (o->out, cpu_env, o->in1, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f128 (s, o->in1, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1953,7 +1938,7 @@ static DisasJumpType op_clgeb(DisasContext *s, DisasOps *o) }gen_helper_clgeb (o->out, cpu_env, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f32 (s, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1966,7 +1951,7 @@ static DisasJumpType op_clgdb(DisasContext *s, DisasOps *o) }gen_helper_clgdb (o->out, cpu_env, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f64 (s, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
@@ -1979,7 +1964,7 @@ static DisasJumpType op_clgxb(DisasContext *s, DisasOps *o) }gen_helper_clgxb (o->out, cpu_env, o->in1, o->in2, m34);tcg_temp_free_i32 (m34); -gen_set_cc_nz_f128 (s, o->in1, o->in2); +set_cc_static (s);return DISAS_NEXT ; }
Signature · 1 line
2.31.1
[PULL 03/17] s390x/tcg: Fix m5 vs. m4 field for VECTOR MULTIPLY SUM LOGICAL
In reply to Cornelia HuckFrom: David Hildenbrand <[email protected]>
The element size is located in m5, not in m4. As there is no m4, qemu currently crashes with an assertion, trying to lookup that field.
Reproduced and tested via GO, which ends up using VMSL once the Vector enhancements facility is around for verifying certificates with elliptic curves.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/449
Message-Id: <[email protected]>
--- target/s390x/translate_vx.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/s390x/translate_vx.c.inc +1 -1
@@ -1783,7 +1783,7 @@ static DisasJumpType op_vmsl(DisasContext *s, DisasOps *o) { TCGv_i64 l1, h1, l2, h2; - if (get_field(s, m4) != ES_64) { + if (get_field(s, m5) != ES_64) { gen_program_exception(s, PGM_SPECIFICATION); return DISAS_NORETURN; }
Signature · 1 line
2.31.1
[PULL 01/17] s390x/cpumodel: add 3931 and 3932
In reply to Cornelia HuckFrom: Christian Borntraeger <[email protected]>
This defines 5 new facilities and the new 3931 and 3932 machines. As before the name is not yet known and we do use gen16a and gen16b. The new features are part of the full model.
The default model is still empty (same as z15) and will be added in a separate patch at a later point in time.
Also add the dependencies of new facilities and as a fix for z15 add a dependency from S390_FEAT_VECTOR_PACKED_DECIMAL_ENH to S390_VECTOR_PACKED_DECIMAL.
Message-Id: <[email protected]>
--- target/s390x/cpu_features_def.h.inc | 5 +++++ target/s390x/cpu_models.c | 6 ++++++ target/s390x/gen-features.c | 14 ++++++++++++++ 3 files changed, 25 insertions(+)
target/s390x/cpu_features_def.h.inc +5 -0
@@ -109,6 +109,11 @@ DEF_FEAT(VECTOR_PACKED_DECIMAL_ENH, "vxpdeh", STFL, 152, "Vector-Packed-Decimal- DEF_FEAT(MSA_EXT_9, "msa9-base", STFL, 155, "Message-security-assist-extension-9 facility (excluding subfunctions)") DEF_FEAT(ETOKEN, "etoken", STFL, 156, "Etoken facility") DEF_FEAT(UNPACK, "unpack", STFL, 161, "Unpack facility") +DEF_FEAT(NNPA, "nnpa", STFL, 165, "NNPA facility") +DEF_FEAT(VECTOR_PACKED_DECIMAL_ENH2, "vxpdeh2", STFL, 192, "Vector-Packed-Decimal-Enhancement facility 2") +DEF_FEAT(BEAR_ENH, "beareh", STFL, 193, "BEAR-enhancement facility") +DEF_FEAT(RDP, "rdp", STFL, 194, "Reset-DAT-protection facility") +DEF_FEAT(PAI, "pai", STFL, 196, "Processor-Activity-Instrumentation facility") /* Features exposed via SCLP SCCB Byte 80 - 98 (bit numbers relative to byte-80) */ DEF_FEAT(SIE_GSLS, "gsls", SCLP_CONF_CHAR, 40, "SIE: Guest-storage-limit-suppression facility")
target/s390x/cpu_models.c +6 -0
@@ -88,6 +88,8 @@ static S390CPUDef s390_cpu_defs[] = {CPUDEF_INIT (0x3907 ,14 ,1 ,47 ,0x08000000U ,"z14ZR1" ,"IBM z14 Model ZR1 GA1" ),CPUDEF_INIT (0x8561 ,15 ,1 ,47 ,0x08000000U ,"gen15a" ,"IBM z15 T01 GA1" ),CPUDEF_INIT (0x8562 ,15 ,1 ,47 ,0x08000000U ,"gen15b" ,"IBM z15 T02 GA1" ), +CPUDEF_INIT (0x3931 ,16 ,1 ,47 ,0x08000000U ,"gen16a" ,"IBM 3931 GA1" ), + CPUDEF_INIT(0x3932, 16, 1, 47, 0x08000000U, "gen16b", "IBM 3932 GA1"), };#define QEMU_MAX_CPU_TYPE 0x3906
@@ -812,6 +814,8 @@ static void check_consistency(const S390CPUModel *model) { S390_FEAT_MSA_EXT_9, S390_FEAT_MSA_EXT_4 }, { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_TOD_CLOCK_STEERING }, { S390_FEAT_VECTOR_PACKED_DECIMAL, S390_FEAT_VECTOR }, + { S390_FEAT_VECTOR_PACKED_DECIMAL_ENH, S390_FEAT_VECTOR_PACKED_DECIMAL }, + { S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2, S390_FEAT_VECTOR_PACKED_DECIMAL_ENH }, { S390_FEAT_VECTOR_ENH, S390_FEAT_VECTOR }, { S390_FEAT_INSTRUCTION_EXEC_PROT, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2 }, { S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2, S390_FEAT_ESOP },
@@ -843,6 +847,8 @@ static void check_consistency(const S390CPUModel *model) { S390_FEAT_PTFF_STOUE, S390_FEAT_MULTIPLE_EPOCH }, { S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, S390_FEAT_AP }, { S390_FEAT_DIAG_318, S390_FEAT_EXTENDED_LENGTH_SCCB }, + { S390_FEAT_NNPA, S390_FEAT_VECTOR }, + { S390_FEAT_RDP, S390_FEAT_LOCAL_TLB_CLEARING }, };int i;
target/s390x/gen-features.c +14 -0
@@ -424,6 +424,8 @@ static uint16_t base_GEN15_GA1[] = { S390_FEAT_MISC_INSTRUCTION_EXT3, }; +#define base_GEN16_GA1 EmptyFeat +/* Full features (in order of release) * Automatically includes corresponding base features. * Full features are all features this hardware supports even if kvm/QEMU do not
@@ -567,6 +569,15 @@ static uint16_t full_GEN15_GA1[] = { S390_FEAT_UNPACK, }; +static uint16_t full_GEN16_GA1[] = { +S390_FEAT_NNPA , +S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2 , +S390_FEAT_BEAR_ENH , +S390_FEAT_RDP , +S390_FEAT_PAI , +}; + +/* Default features (in order of release) * Automatically includes corresponding base features. * Default features are all features this version of QEMU supports for this
@@ -652,6 +663,8 @@ static uint16_t default_GEN15_GA1[] = { S390_FEAT_ETOKEN, }; +#define default_GEN16_GA1 EmptyFeat +/* QEMU (CPU model) features */ static uint16_t qemu_V2_11[] = {
@@ -785,6 +798,7 @@ static CpuFeatDefSpec CpuFeatDef[] = {CPU_FEAT_INITIALIZER (GEN14_GA1 ),CPU_FEAT_INITIALIZER (GEN14_GA2 ),CPU_FEAT_INITIALIZER (GEN15_GA1 ), + CPU_FEAT_INITIALIZER(GEN16_GA1), };#define FEAT_GROUP_INITIALIZER (_name) \
Signature · 1 line
2.31.1
Quoted 13 lines · Cornelia Huck
The following changes since commit
9aef0954195cc592e86846dbbe7f3c2c5603690a:Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-07-06 11:24:58 +0100)
are available in the Git repository at:
https://gitlab.com/cohuck/qemu.git tags/s390x-20210708
for you to fetch changes up to
7ab3eb42b0d795f7321c4fca0ea06cb76a005b04:target/s390x: split sysemu part of cpu models (2021-07-07 14:01:59 +0200)
Quoted 8 lines
----------------------------------------------------------------
s390x updates:
- add gen16 cpumodels
- refactor/cleanup some code
- bugfixes----------------------------------------------------------------
Hi -- this doesn't seem to be signed with the GPG key I have on record for you. If I need to do an update, could you let me know which keyserver you've uploaded to, please?
thanks
-- PMM
Quoted 20 lines · Peter Maydell
Quoted 19 lines · Cornelia Huck
The following changes since commit
9aef0954195cc592e86846dbbe7f3c2c5603690a:Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-07-06 11:24:58 +0100)
are available in the Git repository at:
https://gitlab.com/cohuck/qemu.git tags/s390x-20210708
for you to fetch changes up to
7ab3eb42b0d795f7321c4fca0ea06cb76a005b04:target/s390x: split sysemu part of cpu models (2021-07-07 14:01:59 +0200)
----------------------------------------------------------------
s390x updates:
- add gen16 cpumodels
- refactor/cleanup some code
- bugfixes
Quoted 6 lines
Quoted 2 lines
----------------------------------------------------------------
Hi -- this doesn't seem to be signed with the GPG key I have on record for you. If I need to do an update, could you let me know which keyserver you've uploaded to, please?
Whoops, forgot to upload. Sent out to keys.openpgp.org right now.
Quoted 23 lines · Cornelia Huck
Quoted 20 lines · Peter Maydell
Quoted 19 lines · Cornelia Huck
The following changes since commit
9aef0954195cc592e86846dbbe7f3c2c5603690a:Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-07-06 11:24:58 +0100)
are available in the Git repository at:
https://gitlab.com/cohuck/qemu.git tags/s390x-20210708
for you to fetch changes up to
7ab3eb42b0d795f7321c4fca0ea06cb76a005b04:target/s390x: split sysemu part of cpu models (2021-07-07 14:01:59 +0200)
----------------------------------------------------------------
s390x updates:
- add gen16 cpumodels
- refactor/cleanup some code
- bugfixes
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
----------------------------------------------------------------
Hi -- this doesn't seem to be signed with the GPG key I have on record for you. If I need to do an update, could you let me know which keyserver you've uploaded to, please?
Whoops, forgot to upload. Sent out to keys.openpgp.org right now.
I still can't see it -- can you double-check, please?
thanks
-- PMM
Quoted 27 lines · Peter Maydell
Quoted 26 lines · Cornelia Huck
Quoted 23 lines · Peter Maydell
Quoted 21 lines · Cornelia Huck
The following changes since commit
9aef0954195cc592e86846dbbe7f3c2c5603690a:Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-07-06 11:24:58 +0100)
are available in the Git repository at:
https://gitlab.com/cohuck/qemu.git tags/s390x-20210708
for you to fetch changes up to
7ab3eb42b0d795f7321c4fca0ea06cb76a005b04:target/s390x: split sysemu part of cpu models (2021-07-07 14:01:59 +0200)
----------------------------------------------------------------
s390x updates:
- add gen16 cpumodels
- refactor/cleanup some code
- bugfixes----------------------------------------------------------------
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Hi -- this doesn't seem to be signed with the GPG key I have on record for you. If I need to do an update, could you let me know which keyserver you've uploaded to, please?
Whoops, forgot to upload. Sent out to keys.openpgp.org right now.
I still can't see it -- can you double-check, please?
Hum. Now sent out to pgp.mit.edu and keyserver.ubuntu.com as well, in case something went wrong.
[This is a new ed25519 subkey.]
Quoted 34 lines · Cornelia Huck
Quoted 31 lines · Peter Maydell
Quoted 30 lines · Cornelia Huck
Quoted 26 lines · Peter Maydell
Quoted 13 lines · Cornelia Huck
The following changes since commit
9aef0954195cc592e86846dbbe7f3c2c5603690a:Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-07-06 11:24:58 +0100)
are available in the Git repository at:
https://gitlab.com/cohuck/qemu.git tags/s390x-20210708
for you to fetch changes up to
7ab3eb42b0d795f7321c4fca0ea06cb76a005b04:target/s390x: split sysemu part of cpu models (2021-07-07 14:01:59 +0200)
Quoted 8 lines
----------------------------------------------------------------
s390x updates:
- add gen16 cpumodels
- refactor/cleanup some code
- bugfixes----------------------------------------------------------------
Hi -- this doesn't seem to be signed with the GPG key I have on record for you. If I need to do an update, could you let me know which keyserver you've uploaded to, please?
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Whoops, forgot to upload. Sent out to keys.openpgp.org right now.
I still can't see it -- can you double-check, please?
Hum. Now sent out to pgp.mit.edu and keyserver.ubuntu.com as well, in case something went wrong.
Thanks; was able to get it from keyserver.ubuntu.com; now processing the pullreq.
-- PMM
Peter Maydell
AppliedQuoted 11 lines · Cornelia Huck
The following changes since commit
9aef0954195cc592e86846dbbe7f3c2c5603690a:Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-07-06 11:24:58 +0100)
are available in the Git repository at:
https://gitlab.com/cohuck/qemu.git tags/s390x-20210708
for you to fetch changes up to
7ab3eb42b0d795f7321c4fca0ea06cb76a005b04:
Quoted 8 lines
target/s390x: split sysemu part of cpu models (2021-07-07 14:01:59 +0200)
----------------------------------------------------------------
s390x updates:
- add gen16 cpumodels
- refactor/cleanup some code
- bugfixes
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.1
for any user-visible changes.
-- PMM