qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Which method executes the translated blocks (TBs)?


From: Anderson Sartor
Subject: Re: [Qemu-devel] Which method executes the translated blocks (TBs)?
Date: Thu, 10 Jul 2014 23:31:37 -0300

So, the only test I need to make to be sure that a given TB was completely executed is to check the two lowest bits of next_tb (after tcg_qemu_tb_exec() call), and, if they are not equal to 2 or 3, then the TB finished its execution (if it has 0 or 1 on the 2 lowest bits)? And in the next iteration, the next TB will be executed, considering that chaining is disabled (1 TB per cpu_exec iteration).
Am I missing something?

Thanks


2014-07-09 10:52 GMT-03:00 Anderson Sartor <address@hidden>:
Thank you for your response.
I want to count how many TBs that are executed. For this, I need to know when a given TB is completely executed, without interrupts of any kind.
I disabled the chaining, so, at each iteration, it will execute a single TB.
I will check the documentation that you mentioned.

Thanks


2014-07-09 7:02 GMT-03:00 Peter Maydell <address@hidden>:

On 8 July 2014 18:26, Anderson Sartor <address@hidden> wrote:
> Hi all,
> Which method, in fact, executes the TBs (full-system emulation)? Is it
> tcg_qemu_tb_exec() from cpu_exec()?

Yes.

> At this point, is it possible for the execution of the TB to be interrupted
> (it will try to execute this TB again)?

Depends what you mean. There are circumstances where we
won't actually execute the TB but will stop immediately, but
guest interrupts aren't one of them. (tcg/tcg.h has a good
documentation comment for tcg_qemu_tb_exec describing
this.) It's also possible that execution of the TB might be aborted
due to an exception that causes us to longjmp out and never
return from tcg_qemu_tb_exec().

> If positive, how do I know whether a
> TB was completely executed?

Not sure exactly what you're trying to do here; bear in mind
that tcg_qemu_tb_exec() may execute more than one TB
before it returns.

thanks
-- PMM



reply via email to

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