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

Re: [Xen-devel] [PATCH] AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f


  • To: Jan Beulich <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxx>
  • Date: Fri, 30 Nov 2012 11:14:57 +0000
  • Cc: Wei Huang <wei.huang2@xxxxxxx>, Wei Wang <weiwang.dd@xxxxxxxxx>
  • Delivery-date: Fri, 30 Nov 2012 11:15:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac3O6+4LgOaOu4NLA0mY2dm+sGi5kQ==
  • Thread-topic: [Xen-devel] [PATCH] AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f

On 30/11/2012 08:02, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> An oversight of mine; I'm sorry.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Keir Fraser <keir@xxxxxxx>

> --- a/xen/drivers/passthrough/amd/iommu_init.c
> +++ b/xen/drivers/passthrough/amd/iommu_init.c
> @@ -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-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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