From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LmcNE-00075l-LE for qemu-devel@nongnu.org; Wed, 25 Mar 2009 19:19:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LmcNA-00072l-Vd for qemu-devel@nongnu.org; Wed, 25 Mar 2009 19:19:04 -0400 Received: from [199.232.76.173] (port=35380 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LmcNA-00072Z-Q7 for qemu-devel@nongnu.org; Wed, 25 Mar 2009 19:19:00 -0400 Received: from wf-out-1314.google.com ([209.85.200.175]:43278) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LmcNA-0003Zx-8n for qemu-devel@nongnu.org; Wed, 25 Mar 2009 19:19:00 -0400 Received: by wf-out-1314.google.com with SMTP id 29so305086wff.4 for ; Wed, 25 Mar 2009 16:18:58 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20090325225438.765838184@amt.cnet> References: <20090325224714.853788328@amt.cnet> <20090325225438.765838184@amt.cnet> Date: Wed, 25 Mar 2009 20:18:58 -0300 Message-ID: <5d6222a80903251618y50ca4a63rbbb3b5e1b13b4f5@mail.gmail.com> Subject: Re: [Qemu-devel] [patch 01/10] qemu: create helper for event notification From: Glauber Costa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Marcelo Tosatti > +void qemu_notify_event(void) > +{ > + =C2=A0 =C2=A0CPUState *env =3D cpu_single_env; > + > + =C2=A0 =C2=A0if (env) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0cpu_exit(env); > +#ifdef USE_KQEMU > + =C2=A0 =C2=A0 =C2=A0 =C2=A0if (env->kqemu_enabled) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kqemu_cpu_interrupt(env); > +#endif > + =C2=A0 =C2=A0 } > =C2=A0} Have you tested this with kqemu? It will fire kqemu interrupts in a lot of circunstances it didn't before. That said, I don't even think kqemu is that important, but if it's in the tree, we don't want to introduce regressions. I'd suggest passing a flag indicating the type of event we're notifying. It's easy to foresee other uses for that as well. --=20 Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."