x86/IRQ: prevent vector sharing within IO-APICs
authorJan Beulich <jbeulich@suse.com>
Fri, 18 Nov 2011 08:21:24 +0000 (09:21 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 18 Nov 2011 08:21:24 +0000 (09:21 +0100)
commit8eca0db0e836a081d873de7e9eefb3763f065780
tree3d1de8742a3c35ef7ce3184bb2d1712f49da826f
parentf0b7583fd5a6ea317637693138e060a263b94a2c
x86/IRQ: prevent vector sharing within IO-APICs

Following the prevention of vector sharing for MSIs, this change
enforces the same within IO-APICs: Pin based interrupts use the IO-APIC
as their identifying device under the AMD IOMMU (and just like for
MSIs, only the identifying device is used to remap interrupts here,
with no regard to an interrupt's destination).

Additionally, LAPIC initiated EOIs (for level triggered interrupts) too
use only the vector for identifying which interrupts to end. While this
generally causes no significant problem (at worst an interrupt would be
re-raised without a new interrupt event actually having occurred), it
still seems better to avoid the situation.

For this second aspect, a distinction is being made between the
traditional and the directed-EOI cases: In the former, vectors should
not be shared throughout all IO-APICs in the system, while in the
latter case only individual IO-APICs need to be contrained (or, if the
firmware indicates so, sub- groups of them having the same GSI appear
at multiple pins).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/io_apic.c
xen/arch/x86/irq.c
xen/include/asm-x86/irq.h