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

[Xen-changelog] [xen-4.1-testing] VT-d: split .ack and .disable DMA-MSI actors


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
  • Date: Thu, 04 Oct 2012 16:11:09 +0000
  • Delivery-date: Thu, 04 Oct 2012 16:11:17 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1349339737 -7200
# Node ID 90fcc034c1a89b21631cdffb0248f28c7b3cfe50
# Parent  16e98ef904f97e1a824c1d67a2a78e928dca89cf
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@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
Acked-by Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
xen-unstable changeset: 25836:7d216f026f71
xen-unstable date: Mon Sep 10 07:45:30 UTC 2012
---


diff -r 16e98ef904f9 -r 90fcc034c1a8 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Thu Oct 04 10:34:29 2012 +0200
+++ b/xen/drivers/passthrough/vtd/iommu.c       Thu Oct 04 10:35:37 2012 +0200
@@ -1017,9 +1017,6 @@ static void dma_msi_mask(unsigned int ir
 {
     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(unsi
     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,
 };

_______________________________________________
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®.