Page 1 of 1

Spurious IRQs

Posted: Wed Feb 17, 2016 1:14 pm
by BrightLight
I know why spurious IRQs occur, but my question is this: why do they occur so often, and only in Bochs?
For example, from my kernel log messages:

Code: Select all

[apic] received a spurious IRQ, total of 1 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 2 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 3 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 4 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 5 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 6 spurious IRQs occured since boot.

Re: Spurious IRQs

Posted: Wed Feb 17, 2016 1:42 pm
by Brendan
Hi,
omarrx024 wrote:I know why spurious IRQs occur, but my question is this: why do they occur so often, and only in Bochs?
For example, from my kernel log messages:

Code: Select all

[apic] received a spurious IRQ, total of 1 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 2 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 3 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 4 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 5 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 6 spurious IRQs occured since boot.
Are you using polling for something?

E.g. device sends IRQ to IO APIC, IO APIC starts sending IRQ to CPU, you poll the device and the interrupt disappears, now APIC has told CPU there's an IRQ and CPU wants to know which one and APIC can only say "Heh, um, it was spurious" to keep CPU happy.


Cheers,

Brendan

Re: Spurious IRQs

Posted: Wed Feb 17, 2016 2:10 pm
by BrightLight
My ATA driver uses polling, but this occurs after the boot has finished. The system isn't doing anything while the spurious IRQs occur.
Pressing Ctrl+Left Mouse Button+Right Mouse Button seems to create the IRQ.