Ulrich Weigand wrote:
> 
> >   - (RvH) I changed host-linux.c so that it takes the amount of
> >     quanta to run as an argument to ioctl().  Now it doesn't trap
> >     back to the user application on ever quantum.
> 
> Another point I just noticed: it doesn't even react on signals
> any more, so you can't stop the user process with Ctrl-C ;-)
> This is fixed by placing this check inside the loop:
> 
>                   // Check for pending signals
>                   if (current->signal & ~current->blocked) {
>                       ret = -ERESTARTSYS;
>                       break;
>                   }

Okay.  But the user application should be aware of signals:
on ctrl-c, it needs to tear down the vM, too, or we'll be stuck
with allocated data (is there no other way ?  when I process is
killed, all its open files are released, no ?  we should put
cleanup stuff in fmw_release()).
 
> Yet another point: the
> 
>                   sti();
>                   soft_int(monitor_info.vector);
> 
> creates a race condition, as the 'int' instruction is *not*
> the first instruction after the sti()!  You'll need to place
> an sti assembly instruction inside the soft_int code, as the
> instruction immediately preceding the 'int'.

Okay.
 
> By the way, the soft_int self-modifying code is not particularly
> SMP-safe (but then again, the whole module isn't ...) ;-)

Hmmm... why not ?  What can we do about that ?

Ramon


Reply via email to