aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel_irq_remapping.c
diff options
context:
space:
mode:
authorFeng Wu <feng.wu@intel.com>2015-06-09 01:20:33 -0400
committerThomas Gleixner <tglx@linutronix.de>2015-06-12 05:33:52 -0400
commitd75f152fc389cdd73a6c17f1247fce9052fd579c (patch)
tree39cef2c68ba8080bc2a5f462003d0a6e9c570771 /drivers/iommu/intel_irq_remapping.c
parent2705a3d2a690c3dd9f58c7d788bc0f432acdeceb (diff)
iommu, x86: Avoid migrating VT-d posted interrupts
When the interrupt is configured in posted mode, the destination of the interrupt is set in the Posted-Interrupts Descriptor and the migration of these interrupts happens during vCPU scheduling. We still update the cached irte, which will be used when changing back to remapping mode, but we avoid writing the table entry as this would overwrite the posted mode entry. Signed-off-by: Feng Wu <feng.wu@intel.com> Reviewed-by: Jiang Liu <jiang.liu@linux.intel.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Joerg Roedel <joro@8bytes.org> Cc: iommu@lists.linux-foundation.org Cc: dwmw2@infradead.org Link: http://lkml.kernel.org/r/1433827237-3382-7-git-send-email-feng.wu@intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/iommu/intel_irq_remapping.c')
-rw-r--r--drivers/iommu/intel_irq_remapping.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index 68bce0a52b9b..3bcb459905c4 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -1003,7 +1003,10 @@ intel_ir_set_affinity(struct irq_data *data, const struct cpumask *mask,
1003 */ 1003 */
1004 irte->vector = cfg->vector; 1004 irte->vector = cfg->vector;
1005 irte->dest_id = IRTE_DEST(cfg->dest_apicid); 1005 irte->dest_id = IRTE_DEST(cfg->dest_apicid);
1006 modify_irte(&ir_data->irq_2_iommu, irte); 1006
1007 /* Update the hardware only if the interrupt is in remapped mode. */
1008 if (ir_data->irq_2_iommu.mode == IRQ_REMAPPING)
1009 modify_irte(&ir_data->irq_2_iommu, irte);
1007 1010
1008 /* 1011 /*
1009 * After this point, all the interrupts will start arriving 1012 * After this point, all the interrupts will start arriving