On 4/3/19 4:17 AM, David Hildenbrand wrote: >> + /* >> + * Note that handle_mmu_fault sets ilen to either 2 (for code) > This comment no longer matches. > >> + * or AUTO (for data). We can resolve AUTO now, as if it was >> + * set to UNWIND -- that will have been done via assignment >> + * in cpu_restore_state. Otherwise re-examine access_type. >> + */ >> + if (access_type == MMU_INST_FETCH) { >> + CPUS390XState *env = cs->env_ptr; >> + env->int_pgm_ilen = 2; >> + }
Indeed it doesn't. It's also confusingly written. I've tried again as /* * The ILC value for code accesses is undefined. The important * thing here is to *not* leave env->int_pgm_ilen set to ILEN_AUTO, * which would cause do_program_interrupt to attempt to read from * env->psw.addr again. C.f. the condition in trigger_page_fault, * but is not universally applied. * * ??? If we remove ILEN_AUTO, by moving the computation of ILEN * into cpu_restore_state, then we may remove this entirely. */ if (access_type == MMU_INST_FETCH) { env->int_pgm_ilen = 2; } I'll just note in passing that the ??? part of the comment alludes to https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg00063.html to which I ought to return at some point. r~