* Claudio Jeker <cje...@diehard.n-r-g.com> [2020-05-25 10:14:11 +0200]:

> The problem is that the vm exit is handled by a different thread then the
> event loop. So some event_add/evtimer_add calls are done from a different
> thread then the main event loop (mainly interrupt processing).
> 
> One approach to fix this is to ensure that the event functions are
> exclusivly used in the main event thread but as usual it is easy to
> introduce bugs again. 

Hi Claudio,

I think it is possible to do this without too much complexity till we
have one only one cpu.  Bascially, we have two threads right now that do
event_add/evtimer_add, 
1) vmm_pipe / imsg comm channel between vmm and vm process
2) vcpu0 loop

I think it's possible to make the vmm_pipe be not its own thread and
just be an event based implementation.

Dave actually discovered that if you disable vmm_pipe, this libevent
state corruption does not occour.

I will take a stab at this.


--
Pratik

Reply via email to