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@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
entry->msg = *msg;
if ( iommu_enabled )
+ {
+ ASSERT(msg != &entry->msg);
iommu_update_ire_from_msi(entry, msg);
+ }
switch ( entry->msi_attrib.type )
{
int ret;
struct msi_desc *entry, *tmp;
struct irq_desc *desc;
+ struct msi_msg msg;
ASSERT(spin_is_locked(&pcidevs_lock));
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(desc, entry->msi_attrib.masked);