On Wed, 21 Apr 2021 at 20:51, Alex Bennée <alex.ben...@linaro.org> wrote: > > > Alex Bennée <alex.ben...@linaro.org> writes: > > To further document my confusion: > > > > gdb --args $QEMU ./tests/tcg/$ARCH/signals > > > > will SEGV in generated code for every target I've run. This seems to be > > some sort of change of behaviour by running inside a debug > > environment. > > This bit at least seems to be triggered by the page protections for > detecting SMC - I think. If you skip past them it triggers: > > if (is_write && info->si_signo == SIGSEGV && info->si_code == SEGV_ACCERR > && > h2g_valid(address)) { > switch (page_unprotect(h2g(address), pc)) { > > and runs.
Yeah, for linux-user code SEGV in generated code is expected and handled -- it's how we catch things like SMC and other cases that in softmmu we handle via the softmmu slowpath. thanks -- PMM