27.08.2015, 19:54, "Peter Maydell" <peter.mayd...@linaro.org>: > On 26 August 2015 at 12:36, Sergey Sorokin <afaral...@yandex.ru> wrote: >> If any store instruction writes the code inside the same TB >> after this store insn, the execution of the TB must be stopped >> to execute new code correctly. >> As described in ARMv8 manual D3.4.6 a self-modified code need to do >> IC invalidation to be valid. So it's enough to end the TB >> after IC invalidation instruction on the code translation. > > I think it would be better to fix this problem by requiring > that we end the TB on every ISB instruction. We need to do > that anyway, because the v8 ARM ARM D1.14.4 says that we > must take interrupts immediately after an ISB. And if you have > self-modifying code then you'll need to put an ISB between > the store and the execution, so it will deal with your bug too. > > thanks > -- PMM
Such was the first internal version of the patch, but I altered it before the sending :) Ok, I'll bring back this solution.