[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How does QEMU in TCG mode handle interrupts ?

From: Arnabjyoti Kalita
Subject: How does QEMU in TCG mode handle interrupts ?
Date: Sat, 22 Aug 2020 14:12:08 +0530

Hello all,

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 
-d in_asm,cpu,exec,nochain

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 ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]