aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-10-04 10:35:37 +0200
committerJan Beulich <jbeulich@suse.com>2012-10-04 10:35:37 +0200
commit230b3538e81da4dd3260aa9209683bad59d1f7ec (patch)
treec0a1e6643afe7ea688aefb82cc5cb1262b4960ad
parenta9e45d057ba79c22d462195625fcc98ea5d04a4d (diff)
downloadxen-230b3538e81da4dd3260aa9209683bad59d1f7ec.tar.gz
xen-230b3538e81da4dd3260aa9209683bad59d1f7ec.tar.bz2
xen-230b3538e81da4dd3260aa9209683bad59d1f7ec.zip
VT-d: split .ack and .disable DMA-MSI actors
Calling irq_complete_move() from .disable is wrong, breaking S3 resume. Comparing with all other .ack actors, it was also missing a call to move_{native,masked}_irq(). As the actor is masking its interrupt anyway (albeit it's not immediately obvious why), the latter is the better choice. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by Xiantao Zhang <xiantao.zhang@intel.com> xen-unstable changeset: 25836:7d216f026f71 xen-unstable date: Mon Sep 10 07:45:30 UTC 2012
-rw-r--r--xen/drivers/passthrough/vtd/iommu.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index a943bb85c6..e1faacba82 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1017,9 +1017,6 @@ static void dma_msi_mask(unsigned int irq)
{
unsigned long flags;
struct iommu *iommu = irq_to_iommu[irq];
- struct irq_desc *desc = irq_to_desc(irq);
-
- irq_complete_move(&desc);
/* mask it */
spin_lock_irqsave(&iommu->register_lock, flags);
@@ -1033,6 +1030,15 @@ static unsigned int dma_msi_startup(unsigned int irq)
return 0;
}
+static void dma_msi_ack(unsigned int irq)
+{
+ struct irq_desc *desc = irq_to_desc(irq);
+
+ irq_complete_move(&desc);
+ dma_msi_mask(irq);
+ move_masked_irq(irq);
+}
+
static void dma_msi_end(unsigned int irq, u8 vector)
{
dma_msi_unmask(irq);
@@ -1097,7 +1103,7 @@ static hw_irq_controller dma_msi_type = {
.shutdown = dma_msi_mask,
.enable = dma_msi_unmask,
.disable = dma_msi_mask,
- .ack = dma_msi_mask,
+ .ack = dma_msi_ack,
.end = dma_msi_end,
.set_affinity = dma_msi_set_affinity,
};