aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/msi.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-08-08 11:12:14 +0200
committerJan Beulich <jbeulich@suse.com>2013-08-08 11:12:14 +0200
commitd1b6d0a02489c2d0e237d03e1d8af8d11df53b05 (patch)
tree63f46916a9ffd60319ae7da560bee26bc00b456b /xen/include/asm-x86/msi.h
parentfe6df5abc40ba9928b25e84a9e2aa7434ce76283 (diff)
downloadxen-d1b6d0a02489c2d0e237d03e1d8af8d11df53b05.tar.gz
xen-d1b6d0a02489c2d0e237d03e1d8af8d11df53b05.tar.bz2
xen-d1b6d0a02489c2d0e237d03e1d8af8d11df53b05.zip
x86: enable multi-vector MSI
This implies - extending the public interface to have a way to request a block of MSIs - allocating a block of contiguous pIRQ-s for the target domain (but note that the Xen IRQs allocated have no need of being contiguous) - repeating certain operations for all involved IRQs - fixing multi_msi_enable() - adjusting the mask bit accesses for maskable MSIs Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86/msi.h')
-rw-r--r--xen/include/asm-x86/msi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/include/asm-x86/msi.h b/xen/include/asm-x86/msi.h
index 394ef0ef42..06e68533d3 100644
--- a/xen/include/asm-x86/msi.h
+++ b/xen/include/asm-x86/msi.h
@@ -148,7 +148,7 @@ int msi_free_irq(struct msi_desc *entry);
#define multi_msi_capable(control) \
(1 << ((control & PCI_MSI_FLAGS_QMASK) >> 1))
#define multi_msi_enable(control, num) \
- control |= (((num >> 1) << 4) & PCI_MSI_FLAGS_QSIZE);
+ control |= (((fls(num) - 1) << 4) & PCI_MSI_FLAGS_QSIZE);
#define is_64bit_address(control) (!!(control & PCI_MSI_FLAGS_64BIT))
#define is_mask_bit_support(control) (!!(control & PCI_MSI_FLAGS_MASKBIT))
#define msi_enable(control, num) multi_msi_enable(control, num); \