qemu-discuss
[Top][All Lists]
Advanced

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

Re: How does QEMU in TCG mode handle interrupts ?


From: Arnabjyoti Kalita
Subject: Re: How does QEMU in TCG mode handle interrupts ?
Date: Tue, 25 Aug 2020 11:23:16 +0530

Thank you Peter.

This makes sense. In this scenario, when QEMU takes an interrupt at the end of a TB, I understand that the TB execution will not happen. The interrupt will be taken and then the same TB will be re-translated again and later executed, right ? If so, does this methodology apply for all kinds of interrupts, hardware/software/faults/traps/vmexits etc. ?

Best Regards,
Arnab

On Sat, Aug 22, 2020 at 7:01 PM Peter Maydell <peter.maydell@linaro.org> wrote:
On Sat, 22 Aug 2020 at 09:42, Arnabjyoti Kalita
<akalita@cs.stonybrook.edu> wrote:
> 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.

You can't. QEMU will only ever check for and take interrupts
at the end of a TB. The best you can do is that you can
use the '-singlestep' command line option to force QEMU
to put exactly 1 instruction in each TB. This will massively
slow down execution but it also will allow an interrupt
to occur anywhere. This is useful sometimes for debugging,
and also occasionally to run test suite type code that makes
dubious assumptions about exact CPU behaviour. "Real" guest
code should not require it.

thanks
-- PMM

reply via email to

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