ia64/xen-unstable
changeset 18659:d752eaa7c1db
vtd: make the xen_in_range/tboot_in_range checkings also work for IA64.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Oct 20 15:14:55 2008 +0100 (2008-10-20) |
parents | 10a2069a1edb |
children | 6eb23f7ece78 |
files | xen/drivers/passthrough/vtd/iommu.c |
line diff
1.1 --- a/xen/drivers/passthrough/vtd/iommu.c Mon Oct 20 15:13:50 2008 +0100 1.2 +++ b/xen/drivers/passthrough/vtd/iommu.c Mon Oct 20 15:14:55 2008 +0100 1.3 @@ -1012,7 +1012,7 @@ static int intel_iommu_domain_init(struc 1.4 { 1.5 struct hvm_iommu *hd = domain_hvm_iommu(d); 1.6 struct iommu *iommu = NULL; 1.7 - u64 i; 1.8 + u64 i, j, tmp; 1.9 struct acpi_drhd_unit *drhd; 1.10 1.11 drhd = list_entry(acpi_drhd_units.next, typeof(*drhd), list); 1.12 @@ -1031,11 +1031,13 @@ static int intel_iommu_domain_init(struc 1.13 */ 1.14 for ( i = 0; i < max_page; i++ ) 1.15 { 1.16 - if ( xen_in_range(i << PAGE_SHIFT_4K, (i + 1) << PAGE_SHIFT_4K) || 1.17 - tboot_in_range(i << PAGE_SHIFT_4K, (i + 1) << PAGE_SHIFT_4K) ) 1.18 + if ( xen_in_range(i << PAGE_SHIFT, (i + 1) << PAGE_SHIFT) || 1.19 + tboot_in_range(i << PAGE_SHIFT, (i + 1) << PAGE_SHIFT) ) 1.20 continue; 1.21 1.22 - iommu_map_page(d, i, i); 1.23 + tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K); 1.24 + for ( j = 0; j < tmp; j++ ) 1.25 + iommu_map_page(d, (i*tmp+j), (i*tmp+j)); 1.26 } 1.27 1.28 setup_dom0_devices(d);