diff options
Diffstat (limited to 'target-s390x/misc_helper.c')
-rw-r--r-- | target-s390x/misc_helper.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c index 7d66ce1f49..e636464363 100644 --- a/target-s390x/misc_helper.c +++ b/target-s390x/misc_helper.c @@ -594,3 +594,18 @@ void HELPER(chsc)(CPUS390XState *env, uint64_t inst) ioinst_handle_chsc(cpu, inst >> 16); } #endif + +#ifndef CONFIG_USER_ONLY +void HELPER(per_check_exception)(CPUS390XState *env) +{ + CPUState *cs = CPU(s390_env_get_cpu(env)); + + if (env->per_perc_atmid) { + env->int_pgm_code = PGM_PER; + env->int_pgm_ilen = get_ilen(cpu_ldub_code(env, env->per_address)); + + cs->exception_index = EXCP_PGM; + cpu_loop_exit(cs); + } +} +#endif |