[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B8C11DC.1060004@third-harmonic.com>
Date: Mon, 01 Mar 2010 14:13:32 -0500
From: john cooper <john.cooper@...rd-harmonic.com>
To: Gleb Natapov <gleb@...hat.com>
CC: Takuya Yoshikawa <yoshikawa.takuya@....ntt.co.jp>,
linux-kernel@...r.kernel.org, mingo@...e.hu, avi@...hat.com,
mtosatti@...hat.com, zamsden@...hat.com,
john cooper <john.cooper@...rd-harmonic.com>
Subject: Re: use of setjmp/longjmp in x86 emulator.
Gleb Natapov wrote:
> Think about what happens if in the middle of
> instruction emulation some data from device emulated in userspace is
> needed. Emulator should be able to tell KVM that exit to userspace is
> needed and restart instruction emulation when data is available.
setjmp/longjmp are useful constructs in general but
IME are better suited for infrequent exceptions vs.
routine usage.
If the issue is finding some clean and regular way
to back out from (and possibly reeneter) logic
expressed within nested function invocations, have
you considered turning the problem inside out and
using a state machine approach?
--
john.cooper@...rd-harmonic.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists