[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 04 Dec 2012 00:22:21 +0000
  • Delivery-date: Tue, 04 Dec 2012 00:22:25 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1354272175 -3600
# Node ID a7b0a7cf62e109db00b91f8ae7134da52956df9b
# Parent  f3b6af40e79e1b28cef0225c76874001dfa33bc8
AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f

An oversight of mine; I'm sorry.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r f3b6af40e79e -r a7b0a7cf62e1 xen/drivers/passthrough/amd/iommu_init.c
--- a/xen/drivers/passthrough/amd/iommu_init.c  Fri Nov 30 09:43:29 2012 +0000
+++ b/xen/drivers/passthrough/amd/iommu_init.c  Fri Nov 30 11:42:55 2012 +0100
@@ -795,6 +795,7 @@ static bool_t __init set_iommu_interrupt
 static void enable_iommu(struct amd_iommu *iommu)
 {
     unsigned long flags;
+    struct irq_desc *desc;
 
     spin_lock_irqsave(&iommu->lock, flags);
 
@@ -812,7 +813,11 @@ static void enable_iommu(struct amd_iomm
     if ( iommu_has_feature(iommu, IOMMU_EXT_FEATURE_PPRSUP_SHIFT) )
         register_iommu_ppr_log_in_mmio_space(iommu);
 
-    set_msi_affinity(irq_to_desc(iommu->msi.irq), &cpu_online_map);
+    desc = irq_to_desc(iommu->msi.irq);
+    spin_lock(&desc->lock);
+    set_msi_affinity(desc, &cpu_online_map);
+    spin_unlock(&desc->lock);
+
     amd_iommu_msi_enable(iommu, IOMMU_CONTROL_ENABLED);
 
     set_iommu_ht_flags(iommu);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.