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.
>
> Just one point: not every interrupt reflected back means that a
> quantum has passed ;-)
Uhh.. whatever. :)
> (Anyway, I don't think there is any
> particular use in running for a specific number of quantums
> -- just run until something happens ...)
That's true. We need to make it in such a way that if the
argument to ioctl() is 0, then it runs forever until it needs
to have something handled. The nice thing about being able to
give a number of quanta is that if you know something shouldn't
take too long, you can put a timeout on it this way. Who knows
when that'll come in handy :)
> > on 2.2 we use current->need_resched, but is this true for
> > 2.0 too, or does it have need_resched as a global variable ?
>
> On 2.0, need_resched is indeed a global variable.
Okay... need to fix that.
> > 2.2 SMP is rather annoying because it allocates lots of IPIs,
> > and most of them aren't fixed (2.2 SMP does not use the 0x20-
> > 0x2f mapping for the PIC, but has everything go through the
> > I/O APIC with rather weird interrupt mappings). In order to
> > allocate the correct interrupts I need access to a kernel
> > array called irq_vector[], which unfortunately is not exported
> > to modules.
>
> Argh. Are you really sure this is worth all that effort? Just to
> avoid an additional fault in the unlikely case that the guest OS uses
> a software interrupt that doesn't overlap with hardware vectors?
Let's say we run linux in the virtual machine. If we do it the
economic way (the way it is now) then linux system call interrupt
will directly jump to the system call entry point, without any
hassle in the monitor --> fast. Your way such an oft-used interrupt
is slowed down immensely. I'd rather slow down things only if
there's no other choice...
I've been thinking of other ways to find out what interrupts are
allocated without having access to structures that I'm not supposed
to access (I assume that all the unused interrupts have a spcific
kind of IDT entry... we could try to loop through the IDT to
figure out which interrupts are actually in use.) I'm still looking
into that. OTOH, for such a little thing like exporting a symbol,
we might as well ask the linux guys to add an extra line to their
kernel :)
Ramon