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

[Xen-changelog] [xen-4.1-testing] x86/MSI: fix 2nd S3 resume with interrupt remapping enabled


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

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1349339505 -7200
# Node ID 99818c48b1e2107aa8c095ce7696cc3016f80893
# Parent  b26ca2d8d52ba2bc7e083bae96796d1a9ace9140
x86/MSI: fix 2nd S3 resume with interrupt remapping enabled

The first resume from S3 was corrupting internal data structures (in
that pci_restore_msi_state() updated the globally stored MSI message
from traditional to interrupt remapped format, which would then be
translated a second time during the second resume, breaking interrupt
delivery).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset: 25834:0376c85caaf3
xen-unstable date: Fri Sep  7 15:57:10 UTC 2012
---


diff -r b26ca2d8d52b -r 99818c48b1e2 xen/arch/x86/msi.c
--- a/xen/arch/x86/msi.c        Thu Oct 04 10:28:09 2012 +0200
+++ b/xen/arch/x86/msi.c        Thu Oct 04 10:31:45 2012 +0200
@@ -223,7 +223,10 @@ static void write_msi_msg(struct msi_des
     entry->msg = *msg;
 
     if ( iommu_enabled )
+    {
+        ASSERT(msg != &entry->msg);
         iommu_update_ire_from_msi(entry, msg);
+    }
 
     switch ( entry->msi_attrib.type )
     {
@@ -954,6 +957,7 @@ int pci_restore_msi_state(struct pci_dev
     int irq;
     struct msi_desc *entry, *tmp;
     struct irq_desc *desc;
+    struct msi_msg msg;
 
     ASSERT(spin_is_locked(&pcidevs_lock));
 
@@ -982,7 +986,8 @@ int pci_restore_msi_state(struct pci_dev
         else if ( entry->msi_attrib.type == PCI_CAP_ID_MSIX )
             msix_set_enable(pdev, 0);
 
-        write_msi_msg(entry, &entry->msg);
+        msg = entry->msg;
+        write_msi_msg(entry, &msg);
 
         msi_set_mask_bit(irq, entry->msi_attrib.masked);
 

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