TeLeMan wrote: >> Now to the content: env already equals single_cpu_env, so there is no >> need in writing it back. That's because break/watchpoints are triggered >> synchronously over the context in which they may raise an exception as >> result. > env in op_help.c is asm(AREG0) not single_cpu_env. Which makes no difference due to the synchronous characteristics. The point where env and single_cpu_env diverges while a vcpu is running is the beginning of a bug. > Did you test your codes? I'm using it, including SMP. There is still a bug, but it's unrelated to the context. It's related to watchpoints triggering in helper function instead of generated code. Will fix that later. Jan