[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] setjmp and longjmp in qemu
From: |
Xin Tong |
Subject: |
Re: [Qemu-devel] setjmp and longjmp in qemu |
Date: |
Mon, 23 Apr 2012 20:14:11 -0400 |
so it is not possible to have a longjmp happening while an emulated
cpu is in the middle of translating code ( i.e. in frontend or tcg).
Xin
On Mon, Apr 23, 2012 at 12:02 PM, Peter Maydell
<address@hidden> wrote:
> On 23 April 2012 01:06, Xin Tong <address@hidden> wrote:
>> QEMU uses this very hard to understand setjmp and longjmp to handle
>> asynchronous interrupt. what i do not understand is that say one of
>> the process is doing a context switching in the guest os. tlb_flush
>> gets called, what if in the middle of tlb_flush, an interrupt comes in
>> ( longjmp executed ).
>
> We don't do a longjmp for interrupts. Mostly they're used for
> exceptions (eg "memory access faulted"), so they only happen
> in fairly restricted contexts where it is safe to longjmp.
>
> -- PMM