On 02/04/2017 02:17 PM, Peter Maydell wrote: > On 4 February 2017 at 12:52, Frederic Konrad <fred.kon...@greensocs.com> > wrote: >> Is that the case that we might get a Bad RAM address error or some such >> if we are not on a page boundary (or too small as you say)? >> I guess this is a limitation. Mapping on a page boundary shouldn't be >> too much restrictive. > > Yeah. I really ought to look more closely at what the flow of > execution is here, because I think how it works right now > is a bit weird and works as much by luck as by judgement > (we can longjump out of the middle of translating code > right back to the cpu-exec.c loop, and in some cases > I think what happens is that we try to translate code, > and as part of the "load didn't work" code path we > nestedly try to translate the same thing again which > of course fails again, only the second time around we > realize and longjump out. > > (At the moment for linux-user mode this is causing us to > assert about taking the tb lock twice, because we hold > the tb lock during translation and then try to grab it > again to do the cpu_restore_state() in the signal handler.) >
Yes it seems there are some scary things happening there. Fred > thanks > -- PMM >