Fix interrupts not working with -enable-kvm
This commit is contained in:
@ -246,16 +246,13 @@ void intr_handleintr(IntrStackFrame *frame) {
|
||||
cpu_hang();
|
||||
}
|
||||
} else if (frame->trapnum >= 32 && frame->trapnum <= 47) {
|
||||
bool send = true;
|
||||
IntrHandler *ih, *ihtmp;
|
||||
LL_FOREACH_SAFE(INTR_HANDLERS, ih, ihtmp) {
|
||||
if ((uint64_t)ih->irq == frame->trapnum) {
|
||||
if (ih->fn(frame) == INTR_NOEOI) {
|
||||
send = false;
|
||||
}
|
||||
ih->fn(frame);
|
||||
}
|
||||
}
|
||||
if (send) intr_pic_eoi();
|
||||
intr_pic_eoi();
|
||||
} else if (frame->trapnum == 0x80) {
|
||||
intr_syscalldispatch(frame);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user