I'm working on the instrumentation of each (translated) basic block. The host arch is x86_64. At the beginning of each translated basic block, I added some instructions to do some accounting. Then under some conditions I need to raise an NMI inside a translated basic block. The following is (part of ) what I added to tcg_gen_code_common().
It seems that this NMI is not handled properly in cpu_exec(). I also tried cpu_interrupt(), this also did not work. What I want to do is to raise an NMI inside a translated basic block, any suggestions?