* [PATCH] AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f
@ 2012-11-30 8:02 Jan Beulich
2012-11-30 9:40 ` Ian Campbell
2012-11-30 11:14 ` Keir Fraser
0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2012-11-30 8:02 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Huang, Wei Wang
[-- Attachment #1: Type: text/plain, Size: 923 bytes --]
An oversight of mine; I'm sorry.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- 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);
[-- Attachment #2: AMD-IOMMU-MSI-fix.patch --]
[-- Type: text/plain, Size: 979 bytes --]
AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f
An oversight of mine; I'm sorry.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- 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);
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f
2012-11-30 8:02 [PATCH] AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f Jan Beulich
@ 2012-11-30 9:40 ` Ian Campbell
2012-11-30 11:14 ` Keir Fraser
1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2012-11-30 9:40 UTC (permalink / raw)
To: Jan Beulich; +Cc: Wei Huang, Wei Wang, xen-devel
On Fri, 2012-11-30 at 08:02 +0000, Jan Beulich wrote:
> An oversight of mine; I'm sorry.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Seems pretty clear cut given the log in test flight #14494
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Ian.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f
2012-11-30 8:02 [PATCH] AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f Jan Beulich
2012-11-30 9:40 ` Ian Campbell
@ 2012-11-30 11:14 ` Keir Fraser
1 sibling, 0 replies; 3+ messages in thread
From: Keir Fraser @ 2012-11-30 11:14 UTC (permalink / raw)
To: Jan Beulich, xen-devel; +Cc: Wei Huang, Wei Wang
On 30/11/2012 08:02, "Jan Beulich" <JBeulich@suse.com> wrote:
> An oversight of mine; I'm sorry.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
> --- 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@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-30 11:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-30 8:02 [PATCH] AMD IOMMU: add locking missing from c/s 26198:ba90ecb0231f Jan Beulich
2012-11-30 9:40 ` Ian Campbell
2012-11-30 11:14 ` Keir Fraser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).