vpci/msi: fix update of bound MSI interrupts
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 2 Jul 2018 11:07:55 +0000 (13:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 2 Jul 2018 11:07:55 +0000 (13:07 +0200)
commit1e34ed7174cce6ab37e420dda9452267301fb7d2
treebb541c0576be28dc6e213e0675e45003b6759070
parent9109e5afb99012244e9fbe7f44e7010950051443
vpci/msi: fix update of bound MSI interrupts

Current update process of already bound MSI interrupts is wrong
because unmap_domain_pirq calls pci_disable_msi, which disables MSI
interrupts on the device. On the other hand map_domain_pirq doesn't
enable MSI, so the current update process of already enabled MSI
entries is wrong because MSI control bit will be disabled by
unmap_domain_pirq and not re-enabled by map_domain_pirq.

In order to fix this avoid unmapping the PIRQs and just update the
binding of the PIRQ. A new arch helper to do that is introduced.

Note that MSI-X is not affected because unmap_domain_pirq only
disables the MSI enable control bit for the MSI case, for MSI-X the
bit is left untouched by unmap_domain_pirq.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/vmsi.c
xen/drivers/vpci/msi.c
xen/include/xen/vpci.h