On Mon, 14 Mar 2022 at 04:46, Richard Henderson <richard.hender...@linaro.org> wrote: > > If CONFIG_ATOMIC64, we can use a host cmpxchg and provide > atomicity across processes; otherwise we have no choice but > to continue using start/end_exclusive. > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
> -segv: > - end_exclusive(); > - /* We get the PC of the entry address - which is as good as anything, > - on a real kernel what you get depends on which mode it uses. */ This comment about the PC the guest signal handler is going to see when we take the SEGV is still valid, I think ? > - /* XXX: check env->error_code */ > - force_sig_fault(TARGET_SIGSEGV, TARGET_SEGV_MAPERR, > - env->exception.vaddress); > + segv: > + force_sig_fault(TARGET_SIGSEGV, > + page_get_flags(addr) & PAGE_VALID ? > + TARGET_SEGV_ACCERR : TARGET_SEGV_MAPERR, addr); > } Otherwise Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM