aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-08-23 09:22:08 +0200
committerJan Beulich <jbeulich@suse.com>2013-08-23 09:22:08 +0200
commit1035bb64fd7fd9f05c510466d98566fd82e37ad9 (patch)
tree633b821d1480107aaa767fa1382d7510421380d6 /xen/include/asm-x86
parentb5692f2ef9b6fd67c3e7b4d4f2a4bdb1d58100e5 (diff)
downloadxen-1035bb64fd7fd9f05c510466d98566fd82e37ad9.tar.gz
xen-1035bb64fd7fd9f05c510466d98566fd82e37ad9.tar.bz2
xen-1035bb64fd7fd9f05c510466d98566fd82e37ad9.zip
PCI: break MSI-X data out of struct pci_dev_info
Considering that a significant share of PCI devices out there (not the least the myriad of CPU-exposed ones) don't support MSI-X at all, and that the amount of data is well beyond a handful of bytes, break this out of the common structure, at once allowing the actual data to be tracked to become architecture specific. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86')
-rw-r--r--xen/include/asm-x86/msi.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/xen/include/asm-x86/msi.h b/xen/include/asm-x86/msi.h
index 06e68533d3..9eeef63935 100644
--- a/xen/include/asm-x86/msi.h
+++ b/xen/include/asm-x86/msi.h
@@ -214,6 +214,22 @@ struct msg_address {
__u32 hi_address;
} __attribute__ ((packed));
+#define MAX_MSIX_TABLE_ENTRIES (PCI_MSIX_FLAGS_QSIZE + 1)
+#define MAX_MSIX_TABLE_PAGES PFN_UP(MAX_MSIX_TABLE_ENTRIES * \
+ PCI_MSIX_ENTRY_SIZE + \
+ (~PCI_MSIX_BIRMASK & (PAGE_SIZE - 1)))
+
+struct arch_msix {
+ unsigned int nr_entries, used_entries;
+ struct {
+ unsigned long first, last;
+ } table, pba;
+ int table_refcnt[MAX_MSIX_TABLE_PAGES];
+ int table_idx[MAX_MSIX_TABLE_PAGES];
+ spinlock_t table_lock;
+ domid_t warned;
+};
+
void early_msi_init(void);
void msi_compose_msg(struct irq_desc *, struct msi_msg *);
void __msi_set_enable(u16 seg, u8 bus, u8 slot, u8 func, int pos, int enable);