get_device(idxd_confdev(idxd));
device_unregister(idxd_confdev(idxd));
idxd_shutdown(pdev);
----------- if (device_pasid_enabled(idxd))
----------- idxd_disable_system_pasid(idxd);
idxd_device_remove_debugfs(idxd);
-----------
----------- irq_entry = idxd_get_ie(idxd, 0);
----------- free_irq(irq_entry->vector, irq_entry);
----------- pci_free_irq_vectors(pdev);
+++++++++++ idxd_cleanup(idxd);
pci_iounmap(pdev, idxd->reg_base);
---------- if (device_user_pasid_enabled(idxd))
---------- idxd_disable_sva(pdev);
----------- pci_disable_device(pdev);
----------- destroy_workqueue(idxd->wq);
----------- perfmon_pmu_remove(idxd);
put_device(idxd_confdev(idxd));
+++++++++++ idxd_free(idxd);
+++++++++++ pci_disable_device(pdev);
}
static struct pci_driver idxd_pci_driver = {
iommu->flags |= AMD_IOMMU_FLAG_TRANS_PRE_ENABLED;
}
----------- static inline unsigned long tbl_size(int entry_size, int last_bdf)
- {
- unsigned shift = PAGE_SHIFT +
- get_order((last_bdf + 1) * entry_size);
-
- return 1UL << shift;
- }
-
++++++++++ int amd_iommu_get_num_iommus(void)
{
---------- unsigned shift = PAGE_SHIFT +
---------- get_order((last_bdf + 1) * entry_size);
----------
---------- return 1UL << shift;
++++++++++ return amd_iommus_present;
}
---------- int amd_iommu_get_num_iommus(void)
++++++++++ +bool amd_iommu_ht_range_ignore(void)
+{
---------- return amd_iommus_present;
++++++++++ + return check_feature2(FEATURE_HT_RANGE_IGNORE);
+}
+
/*
* Iterate through all the IOMMUs to get common EFR
* masks among all IOMMUs and warn if found inconsistency.
ret = intel_pasid_setup_nested(iommu, dev,
IOMMU_NO_PASID, dmar_domain);
if (ret)
----------- goto unassign_tag;
+++++++++++ goto disable_iopf;
info->domain = dmar_domain;
+++++++++ ++ info->domain_attached = true;
spin_lock_irqsave(&dmar_domain->lock, flags);
list_add(&info->link, &dmar_domain->devices);
spin_unlock_irqrestore(&dmar_domain->lock, flags);
struct io_pgtable_cfg cfg = {
.tlb = &dummy_tlb_ops,
.coherent_walk = true,
----------- .iommu_dev = &dev,
+++ ++++++++ .quirks = IO_PGTABLE_QUIRK_NO_WARN,
};
----------- /* __arm_lpae_alloc_pages() merely needs dev_to_node() to work */
----------- set_dev_node(&dev, NUMA_NO_NODE);
+++++++++++ dev = faux_device_create("io-pgtable-test", NULL, 0);
+++++++++++ if (!dev)
+++++++++++ return -ENOMEM;
+++++++++++
+++++++++++ cfg.iommu_dev = &dev->dev;
for (i = 0; i < ARRAY_SIZE(pgsize); ++i) {
for (j = 0; j < ARRAY_SIZE(address_size); ++j) {