Instead of being tied to the presence of an IOMMU. This avoids doing the
scan in two different places, and although it's only required for PVHv2
guests (that also require and IOMMU), it makes the code slightly easier to
follow.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Feng Wu <feng.wu@intel.com>
---
Changes since v2:
- Expand the commit message.
early_msi_init();
+ scan_pci_devices();
+
iommu_setup(); /* setup iommu if available */
smp_prepare_cpus(max_cpus);
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;
}
static int allocate_domain_resources(struct domain_iommu *hd)
P(iommu_hap_pt_share, "Shared EPT tables");
#undef P
- scan_pci_devices();
-
ret = init_vtd_hw();
if ( ret )
goto error;