Kevin Lawton <[EMAIL PROTECTED]> wrote:

> OK, let me know if anyone confirms adding this works on an SMP
> machine.  I need to learn more about the APIC, and the
> special IPI messaging.

Maybe a more general approach would be better; after all, using the
APIC commands, you can invoke *any* interrupt vector on any other
processor (or your own) ...   It's just that Linux uses this feature
only to invoke int 0x30.

For cleaner code, I'd suggest to drop the special handling of the
PIC IRQs, and use either 

- a bitmap set by the host OS dependent part stating just which 
  interrupt vectors are to be forwarded

or

- simply forward *all* vectors >= 0x20

Real software interrupts won't reach the handlers anyway (they'll
trap out to the virtualization layer), so every time our handler
is called, it's due to an hardware interrupt (either PIC or APIC).


> I guess out of anal-ness, and to get in a good habit
> for other host OSes, we should set IF just before calling
> the INT instruction.  It should be the instruction exactly
> one before the INT instruction though.

To be completely anal, what about the state of the IF on the
flags word pushed by the interrupt?  If the host OS cares to
examine this, it should be set correctly :-/


Bye,
Ulrich

Reply via email to