这个 bug 是我两年多前尝试给 kvmtool 添加 IO-APIC 支持时发现的,当时提交了一组 patch,其中包含对这个 bug 的修复,但没有得到任何回复,最近把这个修复单独提交了一次就被合入了,以前给 Linux 内核社区的项目提交的 patch 都没有被合入过,这次算是有点进步了。
不过现在回头看,如果把 commit message 里的
For PCI interrupts, bits 6:2 of srcbusirq identify the source device.
改成
For PCI interrupts, bits 6:2 of srcbusirq encode the PCI device number.
会更精确一些。