aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/msi.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-02-17 11:06:16 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-02-17 11:06:16 +0000
commite37e2388799a90538f5a57e847a2bb31740d7ffa (patch)
tree2da9c85e1e9e0873dd6182ee06ba9bde9b2b16b7 /xen/include/asm-x86/msi.h
parentf3c727b3249c89478ee0b3ad727207efd4dd8141 (diff)
downloadxen-e37e2388799a90538f5a57e847a2bb31740d7ffa.tar.gz
xen-e37e2388799a90538f5a57e847a2bb31740d7ffa.tar.bz2
xen-e37e2388799a90538f5a57e847a2bb31740d7ffa.zip
passthrough: fix MSI-X table fixmap allocation
Currently, msix table pages are allocated a fixmap page per vector, the available fixmap pages will be depleted when assigning devices with large number of vectors. This patch fixes it, and a bug that prevents cross-page MSI-X table from working properly It now allocates msix table fixmap pages per device, if the table entries of two msix vectors share the same page, it will only be mapped to fixmap once. A ref count is maintained so that it can be unmapped when all the vectors are freed. Also changes the meaning of msi_desc->mask_base from the va of msix table start to the va of the target entry. The former one is currently buggy (it always maps the first page but msix can support up to 2048 entries) and can't handle separately allocated pages. Signed-off-by: Qing He <qing.he@intel.com>
Diffstat (limited to 'xen/include/asm-x86/msi.h')
-rw-r--r--xen/include/asm-x86/msi.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/xen/include/asm-x86/msi.h b/xen/include/asm-x86/msi.h
index 1f18b7c5e3..a5f67e1655 100644
--- a/xen/include/asm-x86/msi.h
+++ b/xen/include/asm-x86/msi.h
@@ -49,9 +49,9 @@
/* MAX fixed pages reserved for mapping MSIX tables. */
#if defined(__x86_64__)
-#define MAX_MSIX_PAGES 512
+#define FIX_MSIX_MAX_PAGES 512
#else
-#define MAX_MSIX_PAGES 32
+#define FIX_MSIX_MAX_PAGES 32
#endif
struct msi_info {
@@ -93,7 +93,7 @@ struct msi_desc {
struct list_head list;
- void __iomem *mask_base;
+ void __iomem *mask_base; /* va for the entry in mask table */
struct pci_dev *dev;
int vector;