aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-09-06 12:46:34 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2011-10-21 08:37:20 -0400
commita1b60c1cd913c5ccfb38c717ba0bd22622425fa7 (patch)
tree74e5c1e847262ba3c42fb3b0396a3e781c168b6e /arch
parent905d66c1e5dc8149e111f04a32bb193f25da1d53 (diff)
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kvm/kvm-ia64.c3
-rw-r--r--arch/x86/kvm/x86.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 8213efe1998c..43f4c92816ef 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -33,6 +33,7 @@
33#include <linux/uaccess.h> 33#include <linux/uaccess.h>
34#include <linux/iommu.h> 34#include <linux/iommu.h>
35#include <linux/intel-iommu.h> 35#include <linux/intel-iommu.h>
36#include <linux/pci.h>
36 37
37#include <asm/pgtable.h> 38#include <asm/pgtable.h>
38#include <asm/gcc_intrin.h> 39#include <asm/gcc_intrin.h>
@@ -204,7 +205,7 @@ int kvm_dev_ioctl_check_extension(long ext)
204 r = KVM_COALESCED_MMIO_PAGE_OFFSET; 205 r = KVM_COALESCED_MMIO_PAGE_OFFSET;
205 break; 206 break;
206 case KVM_CAP_IOMMU: 207 case KVM_CAP_IOMMU:
207 r = iommu_found(); 208 r = iommu_present(&pci_bus_type);
208 break; 209 break;
209 default: 210 default:
210 r = 0; 211 r = 0;
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 84a28ea45fa4..73c6a4268bf4 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -44,6 +44,7 @@
44#include <linux/perf_event.h> 44#include <linux/perf_event.h>
45#include <linux/uaccess.h> 45#include <linux/uaccess.h>
46#include <linux/hash.h> 46#include <linux/hash.h>
47#include <linux/pci.h>
47#include <trace/events/kvm.h> 48#include <trace/events/kvm.h>
48 49
49#define CREATE_TRACE_POINTS 50#define CREATE_TRACE_POINTS
@@ -2095,7 +2096,7 @@ int kvm_dev_ioctl_check_extension(long ext)
2095 r = 0; 2096 r = 0;
2096 break; 2097 break;
2097 case KVM_CAP_IOMMU: 2098 case KVM_CAP_IOMMU:
2098 r = iommu_found(); 2099 r = iommu_present(&pci_bus_type);
2099 break; 2100 break;
2100 case KVM_CAP_MCE: 2101 case KVM_CAP_MCE:
2101 r = KVM_MAX_MCE_BANKS; 2102 r = KVM_MAX_MCE_BANKS;