# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224512095 -3600
# Node ID d752eaa7c1db9d91b141773f177570b0a0e183c7
# Parent 10a2069a1edb49a8f5df97982feefca0f73deee9
vtd: make the xen_in_range/tboot_in_range checkings also work for IA64.
Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
xen/drivers/passthrough/vtd/iommu.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff -r 10a2069a1edb -r d752eaa7c1db xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c Mon Oct 20 15:13:50 2008 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c Mon Oct 20 15:14:55 2008 +0100
@@ -1012,7 +1012,7 @@ static int intel_iommu_domain_init(struc
{
struct hvm_iommu *hd = domain_hvm_iommu(d);
struct iommu *iommu = NULL;
- u64 i;
+ u64 i, j, tmp;
struct acpi_drhd_unit *drhd;
drhd = list_entry(acpi_drhd_units.next, typeof(*drhd), list);
@@ -1031,11 +1031,13 @@ static int intel_iommu_domain_init(struc
*/
for ( i = 0; i < max_page; i++ )
{
- if ( xen_in_range(i << PAGE_SHIFT_4K, (i + 1) << PAGE_SHIFT_4K) ||
- tboot_in_range(i << PAGE_SHIFT_4K, (i + 1) << PAGE_SHIFT_4K) )
+ if ( xen_in_range(i << PAGE_SHIFT, (i + 1) << PAGE_SHIFT) ||
+ tboot_in_range(i << PAGE_SHIFT, (i + 1) << PAGE_SHIFT) )
continue;
- iommu_map_page(d, i, i);
+ tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K);
+ for ( j = 0; j < tmp; j++ )
+ iommu_map_page(d, (i*tmp+j), (i*tmp+j));
}
setup_dom0_devices(d);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|