x86/vioapic: fix usage of index in place of GSI in vioapic_write_redirent
authorRoger Pau Monné <roge.rpau@citrix.com>
Mon, 30 Nov 2020 13:06:38 +0000 (14:06 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 30 Nov 2020 13:06:38 +0000 (14:06 +0100)
commit3ae469af8e680df31eecd0a2ac6a83b58ad7ce53
tree3542faf51e345ae1cc782d286e31952fd09d012a
parent71ac522909e9302350a88bc378be99affa87067c
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>
xen/arch/x86/hvm/vioapic.c