x86_64/ioapic: Make sure that legacy IRQ only appears on one CPU.
commitcd1bb88624164ecf3055f21908751c33dbf759b3
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 23 Apr 2018 14:15:44 +0000 (23 22:15 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 23 Apr 2018 14:15:44 +0000 (23 22:15 +0800)
tree29cb3f99f16698754507b5eca39ee154efb1b437
parentdd8be70aa00232616d8f186ad11e78fe9b1ca0fc
x86_64/ioapic: Make sure that legacy IRQ only appears on one CPU.

The legacy IRQ lookup assumes only one CPU has a given legacy IRQ.

On system w/ large number of IOAPIC, GSI96 could be mapped to IRQ17
on CPU0 (since IRQ96 is used by SYSCALL), while GSI17 is mapped to
IRQ17 on another CPU.  This breaks later IRQ lookup.

Reported-by: Imre Vadasz
Tested-by: Imre Vadasz
sys/platform/pc64/apic/ioapic_abi.c