Fix interrupts not working with -enable-kvm

This commit is contained in:
2025-11-18 14:20:46 +01:00
parent edcdaa5c60
commit 2a0dddead3
5 changed files with 5 additions and 11 deletions

View File

@ -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);
}