]> xenbits.xensource.com Git - xen.git/commit
x86/IO-APIC: fix guest RTE write corner cases
authorJan Beulich <jbeulich@suse.com>
Wed, 15 May 2013 08:52:02 +0000 (10:52 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 15 May 2013 08:52:02 +0000 (10:52 +0200)
commit30256a0ff17f6f3b1278b85103187341d5b0ac42
tree55c6b09a799397c08e163a726f3b27ee1c473886
parent00dece7696c868de6ecb662da067adce814c41d2
x86/IO-APIC: fix guest RTE write corner cases

This fixes two regressions from c/s 20143:a7de5bd776ca ("x86: Make the
hypercall PHYSDEVOP_alloc_irq_vector hypercall dummy"):

For one, IRQs that had their vector set up by Xen internally without a
handler ever having got set (e.g. via "com<n>=..." without a matching
consumer option like "console=com<n>") would wrongly call
add_pin_to_irq() here, triggering the BUG_ON() in that function.

Second, when assign_irq_vector() fails this addition to irq_2_pin[]
needs to be undone.

In the context of this I'm also surprised that the irq_2_pin[]
manipulations here occur without any lock, i.e. rely on Dom0 to do
some sort of serialization.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/io_apic.c