diff options
author | George Dunlap <george.dunlap@eu.citrix.com> | 2011-07-26 18:37:16 +0100 |
---|---|---|
committer | George Dunlap <george.dunlap@eu.citrix.com> | 2011-07-26 18:37:16 +0100 |
commit | 1b5a9e18bc04368e48ed06bd2cb8258508d089a0 (patch) | |
tree | d90b5daeae83b965a9d40aa3e7ba1fe6e3df11d1 /xen/arch/x86/irq.c | |
parent | 5028ef1e1b06001c3334d6abd8c5b1037596ca41 (diff) | |
download | xen-1b5a9e18bc04368e48ed06bd2cb8258508d089a0.tar.gz xen-1b5a9e18bc04368e48ed06bd2cb8258508d089a0.tar.bz2 xen-1b5a9e18bc04368e48ed06bd2cb8258508d089a0.zip |
xen: Option to allow per-device vector maps for MSI IRQs
Add a vector-map to pci_dev, and add an option to point MSI-related
IRQs to the vector-map of the device.
This prevents irqs from the same device from being assigned
the same vector on different pcpus. This is required for systems
using an AMD IOMMU, since the intremap tables on AMD only look at
vector, and not destination ID.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Diffstat (limited to 'xen/arch/x86/irq.c')
-rw-r--r-- | xen/arch/x86/irq.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index f02ab0c9cf..dbd5978622 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -32,6 +32,9 @@ unsigned int __read_mostly nr_irqs_gsi = 16; unsigned int __read_mostly nr_irqs; integer_param("nr_irqs", nr_irqs); +bool_t __read_mostly opt_irq_perdev_vector_map = 0; +boolean_param("irq-perdev-vector-map", opt_irq_perdev_vector_map); + u8 __read_mostly *irq_vector; struct irq_desc __read_mostly *irq_desc = NULL; @@ -1654,6 +1657,9 @@ int map_domain_pirq( dprintk(XENLOG_G_ERR, "dom%d: irq %d in use\n", d->domain_id, irq); desc->handler = &pci_msi_type; + if ( opt_irq_perdev_vector_map + && !desc->chip_data->used_vectors ) + desc->chip_data->used_vectors = &pdev->info.used_vectors; set_domain_irq_pirq(d, irq, info); setup_msi_irq(pdev, msi_desc, irq); spin_unlock_irqrestore(&desc->lock, flags); |