1f6493be08
MVCL is interruptible and we should check for interrupts and process them after writing back the variables to the registers. Let's check for any exit requests and exit to the main loop. Introduce a new helper function for that: cpu_loop_exit_requested(). When booting Fedora 30, I can see a handful of these exits and it seems to work reliable. Also, Richard explained why this works correctly even when MVCL is called via EXECUTE: (1) TB with EXECUTE runs, at address Ae - env->psw_addr stored with Ae. - helper_ex() runs, memory address Am computed from D2a(X2a,B2a) or from psw.addr+RI2. - env->ex_value stored with memory value modified by R1a (2) TB of executee runs, - env->ex_value stored with 0. - helper_mvcl() runs, using and updating R1b, R1b+1, R2b, R2b+1. (3a) helper_mvcl() completes, - TB of executee continues, psw.addr += ilen. - Next instruction is the one following EXECUTE. (3b) helper_mvcl() exits to main loop, - cpu_loop_exit_restore() unwinds psw.addr = Ae. - Next instruction is the EXECUTE itself... - goto 1. As the PoP mentiones that an interruptible instruction called via EXECUTE should avoid modifying storage/registers that are used by EXECUTE itself, it is fine to retrigger EXECUTE. Cc: Alex Bennée <alex.bennee@linaro.org> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com> |
||
---|---|---|
.. | ||
arch_dump.c | ||
cc_helper.c | ||
cpu_features_def.h | ||
cpu_features_def.inc.h | ||
cpu_features.c | ||
cpu_features.h | ||
cpu_models.c | ||
cpu_models.h | ||
cpu-param.h | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
crypto_helper.c | ||
diag.c | ||
excp_helper.c | ||
fpu_helper.c | ||
gdbstub.c | ||
gen-features.c | ||
helper.c | ||
helper.h | ||
insn-data.def | ||
insn-format.def | ||
int_helper.c | ||
internal.h | ||
interrupt.c | ||
ioinst.c | ||
kvm_s390x.h | ||
kvm-stub.c | ||
kvm.c | ||
machine.c | ||
Makefile.objs | ||
mem_helper.c | ||
misc_helper.c | ||
mmu_helper.c | ||
s390-tod.h | ||
sigp.c | ||
tcg_s390x.h | ||
tcg-stub.c | ||
trace-events | ||
translate_vx.inc.c | ||
translate.c | ||
vec_fpu_helper.c | ||
vec_helper.c | ||
vec_int_helper.c | ||
vec_string_helper.c | ||
vec.h |