qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Question about gen_jmp_tb


From: Peter Maydell
Subject: Re: [Qemu-devel] Question about gen_jmp_tb
Date: Mon, 2 Jun 2014 11:47:04 +0100

On 2 June 2014 11:15, Jack Biggs <address@hidden> wrote:
>> When you say arbitrary code what do you mean? Are you wanting to put
>> backend specific code there or a common post-amble of tcg ops? Can you give
>> a bit more detail about your use case?
>
>
> I'm trying to add a clock-synchronization library so that I can have two (or
> more) instances of QEMU run in a synchronized (deterministic) fashion. The
> "arbitrary code" is more or less a function call (i.e., callq) instruction
> to a function that uses shared semaphores to block execution.

Bear in mind that we can also exit a TB via taking an unexpected
exception [usually a load/store which faults], in which case we'll
effectively longjump out of the middle of it.

If you can rearrange your design to only require your hooks
to be called at the *start* of a TB, not the end, that is
much easier -- the existing icount machinery does that already.

thanks
-- PMM



reply via email to

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