[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [patch 01/10] qemu: create helper for event notificatio
From: |
Marcelo Tosatti |
Subject: |
Re: [Qemu-devel] [patch 01/10] qemu: create helper for event notification |
Date: |
Wed, 25 Mar 2009 20:27:11 -0300 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Mar 25, 2009 at 08:18:58PM -0300, Glauber Costa wrote:
> > +void qemu_notify_event(void)
> > +{
> > + CPUState *env = cpu_single_env;
> > +
> > + if (env) {
> > + cpu_exit(env);
> > +#ifdef USE_KQEMU
> > + if (env->kqemu_enabled)
> > + kqemu_cpu_interrupt(env);
> > +#endif
> > + }
> > }
>
> Have you tested this with kqemu?
Nope.
> 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.
qemu_notify_event() basically means "process events handled by
main_loop_wait ASAP". Maybe it needs a better name.
I'll make sure there's no serious regression with kqemu.
There are things like
/* reset soft MMU for next block (it can currently
only be set by a memory fault) */
#if defined(USE_KQEMU)
#define MIN_CYCLE_BEFORE_SWITCH (100 * 1000)
if (kqemu_is_ok(env) &&
(cpu_get_time_fast() - env->last_io_time) >=
MIN_CYCLE_BEFORE_SWITCH) {
cpu_loop_exit();
}
#endif
Which needs some rethinking.