aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/msi.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-11-27 08:05:18 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-11-27 08:05:18 +0000
commitd210b9fc623cdd4963c93707eba0eb7dac198101 (patch)
tree9c8db760588ade9c0eeb765a18aa79a728c37e9c /xen/arch/x86/msi.c
parentdd14c75ad4f3517f742a25ee8e778a3cbcf8fadc (diff)
downloadxen-d210b9fc623cdd4963c93707eba0eb7dac198101.tar.gz
xen-d210b9fc623cdd4963c93707eba0eb7dac198101.tar.bz2
xen-d210b9fc623cdd4963c93707eba0eb7dac198101.zip
VT-d: Free unused interrupt remapping table entry
This patch changes the IRTE allocation method, and frees unused IRTE when device is de-assigned. Signed-Off-By: Zhai Edwin <edwin.zhai@intel.com>
Diffstat (limited to 'xen/arch/x86/msi.c')
-rw-r--r--xen/arch/x86/msi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index 261da58185..fedac7f7aa 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -438,6 +438,11 @@ int msi_free_irq(struct msi_desc *entry)
start = (unsigned long)entry->mask_base & ~(PAGE_SIZE - 1);
msix_put_fixmap(entry->dev, virt_to_fix(start));
}
+
+ /* Free the unused IRTE if intr remap enabled */
+ if ( iommu_enabled )
+ iommu_update_ire_from_msi(entry, NULL);
+
list_del(&entry->list);
xfree(entry);
return 0;