On Mon, 24 Dec 2018 at 10:11, tugouxp <13824125...@163.com> wrote: > think about the scenario like that, a tb block contain 9 native > instructions execute sequentially > > if a interrupt or a signal happens before instruction 6 executed, did the > tb be finished before response to the interrupt or > > the exited at once to response the interrupt?
We don't check in the middle of a TB for conditions like interrupts. The only thing that can cause a TB to stop execution halfway through is if it does something that provokes a synchronous exception (for instance, if it does a guest memory access that triggers a guest CPU page fault, or if it emulates a guest instruction that is required to trap). Those we emulate by longjumping out from the generated code to the top level loop. Asynchronous events like emulated interrupts we only check at the beginning of the TB: we emit code which tests a flag and returns early. thanks -- PMM