I am running QEMU-3.0.0 in TCG mode, and my QEMU as well as TCG target is x86_64 architecture.
What I am trying to do is inject an I/O interrupt in the middle of a translation block.
I have started TCG mode using the following debug flags
Let's say, I have this translation block --
0xffffffff810630a0: 0f 1f 44 00 00 nopl (%rax, %rax)
0xffffffff810630a5: 55 pushq %rbp
0xffffffff810630a6: 48 8b 05 6b 90 0a 01 movq 0x10a906b(%rip), %rax
0xffffffff810630ad: 48 89 e5 movq %rsp, %rbp
0xffffffff810630b0: 8b 80 f0 00 00 00 movl 0xf0(%rax), %eax
0xffffffff810630b6: 89 c0 movl %eax, %eax --- interrupt here
0xffffffff810630b8: 5d popq %rbp
0xffffffff810630b9: c3 retq
And say, I have to make QEMU take an interrupt at the start of the instruction ending with "810630b6". How do I go about doing this?
I have read that the user needs to asynchronously run a function to do this. But should we run the function during the translation phase ? Which function is it ?
How can I "safely" inject an interrupt in the middle of a TB, without disturbing the execution of the block ?