iommu/core: Convert iommu_found to iommu_present

With per-bus iommu_ops the iommu_found function needs to
work on a bus_type too. This patch adds a bus_type parameter
to that function and converts all call-places.
The function is also renamed to iommu_present because the
function now checks if an iommu is present for a given bus
and does not check for a global iommu anymore.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
Joerg Roedel
2011-09-06 18:46:34 +02:00
parent 905d66c1e5
commit a1b60c1cd9
5 changed files with 13 additions and 8 deletions

View File

@@ -228,7 +228,7 @@ int kvm_iommu_map_guest(struct kvm *kvm)
{
int r;
if (!iommu_found()) {
if (!iommu_present(&pci_bus_type)) {
printk(KERN_ERR "%s: iommu not found\n", __func__);
return -ENODEV;
}