} \
} while (0)
-void *map_to_nocache_virt(int nr_iommus, u64 maddr);
-
int vtd_hw_check(void);
void disable_pmr(struct iommu *iommu);
int is_usb_device(u16 seg, u8 bus, u8 devfn);
return -ENOMEM;
}
iommu->intel->drhd = drhd;
+ drhd->iommu = iommu;
- iommu->reg = map_to_nocache_virt(nr_iommus, drhd->address);
+ iommu->reg = ioremap(drhd->address, PAGE_SIZE);
+ if ( !iommu->reg )
+ return -ENOMEM;
iommu->index = nr_iommus++;
iommu->cap = dmar_readq(iommu->reg, DMAR_CAP_REG);
iommu->ecap = dmar_readq(iommu->reg, DMAR_ECAP_REG);
- drhd->iommu = iommu;
-
if ( iommu_verbose )
{
dprintk(VTDPREFIX,
wbinvd();
}
-void *__init map_to_nocache_virt(int nr_iommus, u64 maddr)
-{
- set_fixmap_nocache(FIX_IOMMU_REGS_BASE_0 + nr_iommus, maddr);
- return (void *)fix_to_virt(FIX_IOMMU_REGS_BASE_0 + nr_iommus);
-}
-
static int _hvm_dpci_isairq_eoi(struct domain *d,
struct hvm_pirq_dpci *pirq_dpci, void *arg)
{
FIX_KEXEC_BASE_0,
FIX_KEXEC_BASE_END = FIX_KEXEC_BASE_0 \
+ ((KEXEC_XEN_NO_PAGES >> 1) * KEXEC_IMAGE_NR) - 1,
- FIX_IOMMU_REGS_BASE_0,
- FIX_IOMMU_REGS_END = FIX_IOMMU_REGS_BASE_0 + MAX_IOMMUS-1,
FIX_IOMMU_MMIO_BASE_0,
FIX_IOMMU_MMIO_END = FIX_IOMMU_MMIO_BASE_0 + IOMMU_PAGES -1,
FIX_TBOOT_SHARED_BASE,