debuggers.hg

changeset 21111:e362fab06d42

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@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Mar 25 09:19:33 2010 +0000 (2010-03-25)
parents 9472f08ddd71
children f42ff98a2cdc
files xen/arch/x86/msi.c
line diff
     1.1 --- a/xen/arch/x86/msi.c	Thu Mar 25 07:43:09 2010 +0000
     1.2 +++ b/xen/arch/x86/msi.c	Thu Mar 25 09:19:33 2010 +0000
     1.3 @@ -218,6 +218,8 @@ static int set_irq_msi(struct msi_desc *
     1.4  
     1.5  static void write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
     1.6  {
     1.7 +    entry->msg = *msg;
     1.8 +
     1.9      if ( iommu_enabled )
    1.10          iommu_update_ire_from_msi(entry, msg);
    1.11  
    1.12 @@ -260,7 +262,6 @@ static void write_msi_msg(struct msi_des
    1.13      default:
    1.14          BUG();
    1.15      }
    1.16 -    entry->msg = *msg;
    1.17  }
    1.18  
    1.19  void set_msi_affinity(unsigned int irq, cpumask_t mask)