aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/msi.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-03-25 14:28:31 +0100
committerJan Beulich <jbeulich@suse.com>2013-03-25 14:28:31 +0100
commitfae0372140befb88d890a30704a8ec058c902af8 (patch)
treeeae6ad998551ddd302104d765a75375b7319747f /xen/arch/x86/msi.c
parent85bae8b3406b234f3074617771072623525a3576 (diff)
downloadxen-fae0372140befb88d890a30704a8ec058c902af8.tar.gz
xen-fae0372140befb88d890a30704a8ec058c902af8.tar.bz2
xen-fae0372140befb88d890a30704a8ec058c902af8.zip
IOMMU: properly check whether interrupt remapping is enabled
... rather than the IOMMU as a whole. That in turn required to make sure iommu_intremap gets properly cleared when the respective initialization fails (or isn't being done at all). Along with making sure interrupt remapping doesn't get inconsistently enabled on some IOMMUs and not on others in the VT-d code, this in turn allowed quite a bit of cleanup on the VT-d side (if desired, that cleanup could of course be broken out into a separate patch). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: "Zhang, Xiantao" <xiantao.zhang@intel.com>
Diffstat (limited to 'xen/arch/x86/msi.c')
-rw-r--r--xen/arch/x86/msi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index 88043065d6..37ed8f80d2 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -210,7 +210,7 @@ static void read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
BUG();
}
- if ( iommu_enabled )
+ if ( iommu_intremap )
iommu_read_msi_from_ire(entry, msg);
}
@@ -218,7 +218,7 @@ static void write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
{
entry->msg = *msg;
- if ( iommu_enabled )
+ if ( iommu_intremap )
{
ASSERT(msg != &entry->msg);
iommu_update_ire_from_msi(entry, msg);
@@ -492,7 +492,7 @@ int msi_free_irq(struct msi_desc *entry)
}
/* Free the unused IRTE if intr remap enabled */
- if ( iommu_enabled )
+ if ( iommu_intremap )
iommu_update_ire_from_msi(entry, NULL);
list_del(&entry->list);