It's not vendor specific so it doesn't really belong there.
Scanning the PCI topology also really doesn't have much to do with IOMMU
initialization. It doesn't depend on there even being an IOMMU. This patch
moves to the call to the beginning of iommu_hardware_setup() but only
places it there because the topology information would be otherwise unused.
Subsequent patches will actually make use of the PCI topology during
(x86) IOMMU initialization.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: "Roger Pau Monné" <roger.pau@citrix.com>
Acked-by: Brian Woods <brian.woods@amd.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
if ( !amd_iommu_perdev_intremap )
printk(XENLOG_WARNING "AMD-Vi: Using global interrupt remap table is not recommended (see XSA-36)!\n");
- return scan_pci_devices();
+
+ return 0;
}
int amd_iommu_alloc_root(struct domain_iommu *hd)
P(iommu_hap_pt_share, "Shared EPT tables");
#undef P
- ret = scan_pci_devices();
- if ( ret )
- goto error;
-
ret = init_vtd_hw();
if ( ret )
goto error;
int __init iommu_hardware_setup(void)
{
+ int rc;
+
if ( !iommu_init_ops )
return -ENODEV;
+ rc = scan_pci_devices();
+ if ( rc )
+ return rc;
+
if ( !iommu_ops.init )
iommu_ops = *iommu_init_ops->ops;
else