diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-04-02 08:30:03 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-04-02 08:30:03 +0200 |
commit | af699220ad6d111ba76fc3040342184e423cc9a1 (patch) | |
tree | 7feaa5a36929422c82ee27ef8fd7d97543a41705 /xen/arch/x86/irq.c | |
parent | 527824f41f5fac9cba3d4441b2e73d3118d98837 (diff) | |
download | xen-af699220ad6d111ba76fc3040342184e423cc9a1.tar.gz xen-af699220ad6d111ba76fc3040342184e423cc9a1.tar.bz2 xen-af699220ad6d111ba76fc3040342184e423cc9a1.zip |
x86: irq_move_cleanup_interrupt() must ignore legacy vectors
Since the main loop in the function includes legacy vectors, and since
vector_irq[] gets set up for legacy vectors regardless of whether those
get handled through the IO-APIC, it must not do anything on this vector
range. In fact, we should never get past the move_cleanup_count check
for IRQs not handled through the IO-APIC. Adding a respective assertion
woulkd make those iterations more expensive (due to the lock acquire).
For such an assertion to not have false positives we however ought to
suppress setting up IRQ2 as an 8259A interrupt (which wasn't correct
anyway), which is being done here despite the assertion not actually
getting added.
Furthermore, there's no point iterating over the vectors past
LAST_HIPRIORITY_VECTOR, so terminate the loop accordingly.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/irq.c')
-rw-r--r-- | xen/arch/x86/irq.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 5e0f463c38..fff9f1d353 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -616,7 +616,9 @@ void irq_move_cleanup_interrupt(struct cpu_user_regs *regs) ack_APIC_irq(); me = smp_processor_id(); - for (vector = FIRST_DYNAMIC_VECTOR; vector < NR_VECTORS; vector++) { + for ( vector = FIRST_DYNAMIC_VECTOR; + vector <= LAST_HIPRIORITY_VECTOR; vector++) + { unsigned int irq; unsigned int irr; struct irq_desc *desc; @@ -625,6 +627,9 @@ void irq_move_cleanup_interrupt(struct cpu_user_regs *regs) if ((int)irq < 0) continue; + if ( vector >= FIRST_LEGACY_VECTOR && vector <= LAST_LEGACY_VECTOR ) + continue; + desc = irq_to_desc(irq); if (!desc) continue; |