x86/PCI: read MSI-X table entry count early
authorJan Beulich <jbeulich@suse.com>
Tue, 17 Sep 2019 14:06:15 +0000 (16:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 Sep 2019 14:06:15 +0000 (16:06 +0200)
commit27ddc58d42a7848dbe60ba9f127ddd052906d487
treeb94ef43a4e4373b169cee034ec0772b225347eae
parent076c34d12a341f3915a2d8021752e0641df07496
x86/PCI: read MSI-X table entry count early

Rather than doing this every time we set up interrupts for a device
anew (and then in two distinct places) fill this invariant field
right after allocating struct arch_msix.

While at it also obtain the MSI-X capability structure position just
once, in msix_capability_init(), rather than in each caller.

Furthermore take the opportunity and eliminate the multi_msix_capable()
alias of msix_table_size().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/msi.c
xen/drivers/passthrough/pci.c
xen/include/asm-x86/msi.h