WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.4-testing] x86: s3: write_msi_msg: entry->msg sho

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] x86: s3: write_msi_msg: entry->msg should be in the compatibility format
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Mar 2010 05:45:37 -0700
Delivery-date: Tue, 30 Mar 2010 05:45:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1269952635 -3600
# Node ID a8d1c8013bb69a7f1740d4631ca6b8623d75d9d0
# Parent  17cb4b7a78e900000dc4ae4558392550d6963409
x86: s3: write_msi_msg: entry->msg should be in the compatibility format

When Interrupt Remapping is used, after Dom0 S3, Dom0's filesystem
might become inaccessible as the SATA disk's MSI interrupt becomes
buggy.  The cause is: After set_msi_affinity() or setup_msi_irq()
invokes write_msi_msg(), entry->msg records the remappable format
message; during S3 resume, Dom0 invokes the PHYSDEVOP_restore_msi
hypercall to restore the MSI registers of devices, and in
pci_restore_msi_state() -> write_msi_msg(), the 'entry->msg' of
remappable format is passed, but in write_msi_msg() -> ... ->
msi_msg_to_remap_entry(), the 'msg' is assumed to be in compatibility
format.  As a result, after s3, the IRTE is corrupted.

Actually the only users of 'entry->msg' are pci_restore_msi_state()
and dump_msi(). That's why we don't have issue except Dom0 S3.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
xen-unstable changeset:   21065:e362fab06d42
xen-unstable date:        Thu Mar 25 09:19:33 2010 +0000
---
 xen/arch/x86/msi.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 17cb4b7a78e9 -r a8d1c8013bb6 xen/arch/x86/msi.c
--- a/xen/arch/x86/msi.c        Tue Mar 30 13:36:32 2010 +0100
+++ b/xen/arch/x86/msi.c        Tue Mar 30 13:37:15 2010 +0100
@@ -226,6 +226,8 @@ static int unset_vector_msi(int vector)
 
 static void write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
 {
+    entry->msg = *msg;
+
     if ( iommu_enabled )
         iommu_update_ire_from_msi(entry, msg);
 
@@ -268,7 +270,6 @@ static void write_msi_msg(struct msi_des
     default:
         BUG();
     }
-    entry->msg = *msg;
 }
 
 void set_msi_affinity(unsigned int vector, cpumask_t mask)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] x86: s3: write_msi_msg: entry->msg should be in the compatibility format, Xen patchbot-3.4-testing <=