x86/vioapic: fix usage of index in place of GSI in vioapic_write_redirent
authorRoger Pau Monné <roge.rpau@citrix.com>
Tue, 1 Dec 2020 14:34:55 +0000 (15:34 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 1 Dec 2020 14:34:55 +0000 (15:34 +0100)
commit1d1d1f5391976456a79daac0dcfe7157da1e54f7
tree41fbaaee18a9b817595115a1f03b274c12cb8a65
parent72bd989f51878bc9ba61e930b0c29b921a30dc0d
x86/vioapic: fix usage of index in place of GSI in vioapic_write_redirent

The usage of idx instead of the GSI in vioapic_write_redirent when
accessing gsi_assert_count can cause a PVH dom0 with multiple
vIO-APICs to lose interrupts in case a pin of a IO-APIC different than
the first one is unmasked with pending interrupts.

Switch to use gsi instead to fix the issue.

Fixes: 9f44b08f7d0e4 ('x86/vioapic: introduce support for multiple vIO APICS')
Reported-by: Manuel Bouyer <bouyer@antioche.eu.org>
Signed-off-by: Roger Pau Monné <roge.rpau@citrix.com>
Tested-by: Manuel Bouyer <bouyer@antioche.eu.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 3ae469af8e680df31eecd0a2ac6a83b58ad7ce53
master date: 2020-11-30 14:06:38 +0100
xen/arch/x86/hvm/vioapic.c