Ramon van Handel wrote:

> We shouldn't set IF for an interrupt gate...  but we should for
> a trap gate.

The most accurate solution is to set the IF flag to the value
it would have before an interrupt occurred, regardless of
the type of gate.  This way if the OS looks at the eflags
image, it will be accurate.  This value would of course
be 1, otherwise the interrupt would not have been accepted.
Ulrich made this point, and I agree.



> What I have in mind is this:  in stead of hardcoding all the
> stuff about IRQs and the PIC in monitor.c, we create an
> array of structures for each host (in host-*.c) which contains
> info on all the interrupts that need to be reflected back
> to the host OS, and whether these interrupts are interrupt
> or trap gates, etc.  This is the most general way I can think
> of.  Then monitor.c loops through this array and generates
> interrupt stubs for the interrupts to be reflected from a
> standard template.

Perhaps it's best for the monitor to not know anything about
IRQs and just be passed a reflect-these-interrupts array or
whatever.  I think you're right.  How about just having the
monitor just pass back the vector#, and the host code will
know what to do with a given vector.  Just pass init_monitor()
a list of vectors to make an IDT entry for.


> What do you think ?  Is this a good idea ?  If so, I'll implement
> this as part of the cleanup :)

Sounds like a plan.

-Kevin

Reply via email to