diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-12-03 08:43:34 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-03 08:11:07 -0500 |
commit | 19de40a8472fa64693eab844911eec277d489f6c (patch) | |
tree | 502a8df560341ad715965ed39db33c720c657066 /arch | |
parent | 1aaf118352b85bb359ce28070bcc478f659a7031 (diff) |
KVM: change KVM to use IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/include/asm/kvm_host.h | 2 | ||||
-rw-r--r-- | arch/ia64/kvm/Makefile | 2 | ||||
-rw-r--r-- | arch/ia64/kvm/kvm-ia64.c | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 2 | ||||
-rw-r--r-- | arch/x86/kvm/Makefile | 2 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 3 |
6 files changed, 8 insertions, 6 deletions
diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h index 0560f3fae53..34866366165 100644 --- a/arch/ia64/include/asm/kvm_host.h +++ b/arch/ia64/include/asm/kvm_host.h | |||
@@ -467,7 +467,7 @@ struct kvm_arch { | |||
467 | struct kvm_sal_data rdv_sal_data; | 467 | struct kvm_sal_data rdv_sal_data; |
468 | 468 | ||
469 | struct list_head assigned_dev_head; | 469 | struct list_head assigned_dev_head; |
470 | struct dmar_domain *intel_iommu_domain; | 470 | struct iommu_domain *iommu_domain; |
471 | struct hlist_head irq_ack_notifier_list; | 471 | struct hlist_head irq_ack_notifier_list; |
472 | 472 | ||
473 | unsigned long irq_sources_bitmap; | 473 | unsigned long irq_sources_bitmap; |
diff --git a/arch/ia64/kvm/Makefile b/arch/ia64/kvm/Makefile index cb69dfcfb1a..0bb99b73290 100644 --- a/arch/ia64/kvm/Makefile +++ b/arch/ia64/kvm/Makefile | |||
@@ -51,7 +51,7 @@ EXTRA_AFLAGS += -Ivirt/kvm -Iarch/ia64/kvm/ | |||
51 | common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \ | 51 | common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \ |
52 | coalesced_mmio.o irq_comm.o) | 52 | coalesced_mmio.o irq_comm.o) |
53 | 53 | ||
54 | ifeq ($(CONFIG_DMAR),y) | 54 | ifeq ($(CONFIG_IOMMU_API),y) |
55 | common-objs += $(addprefix ../../../virt/kvm/, iommu.o) | 55 | common-objs += $(addprefix ../../../virt/kvm/, iommu.o) |
56 | endif | 56 | endif |
57 | 57 | ||
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 0f5ebd94843..4e586f6110a 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/bitops.h> | 31 | #include <linux/bitops.h> |
32 | #include <linux/hrtimer.h> | 32 | #include <linux/hrtimer.h> |
33 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
34 | #include <linux/iommu.h> | ||
34 | #include <linux/intel-iommu.h> | 35 | #include <linux/intel-iommu.h> |
35 | 36 | ||
36 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
@@ -188,7 +189,7 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
188 | r = KVM_COALESCED_MMIO_PAGE_OFFSET; | 189 | r = KVM_COALESCED_MMIO_PAGE_OFFSET; |
189 | break; | 190 | break; |
190 | case KVM_CAP_IOMMU: | 191 | case KVM_CAP_IOMMU: |
191 | r = intel_iommu_found(); | 192 | r = iommu_found(); |
192 | break; | 193 | break; |
193 | default: | 194 | default: |
194 | r = 0; | 195 | r = 0; |
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 97215a458e5..730843d1d2f 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -360,7 +360,7 @@ struct kvm_arch{ | |||
360 | struct list_head active_mmu_pages; | 360 | struct list_head active_mmu_pages; |
361 | struct list_head assigned_dev_head; | 361 | struct list_head assigned_dev_head; |
362 | struct list_head oos_global_pages; | 362 | struct list_head oos_global_pages; |
363 | struct dmar_domain *intel_iommu_domain; | 363 | struct iommu_domain *iommu_domain; |
364 | struct kvm_pic *vpic; | 364 | struct kvm_pic *vpic; |
365 | struct kvm_ioapic *vioapic; | 365 | struct kvm_ioapic *vioapic; |
366 | struct kvm_pit *vpit; | 366 | struct kvm_pit *vpit; |
diff --git a/arch/x86/kvm/Makefile b/arch/x86/kvm/Makefile index 00f46c2d14b..d3ec292f00f 100644 --- a/arch/x86/kvm/Makefile +++ b/arch/x86/kvm/Makefile | |||
@@ -7,7 +7,7 @@ common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \ | |||
7 | ifeq ($(CONFIG_KVM_TRACE),y) | 7 | ifeq ($(CONFIG_KVM_TRACE),y) |
8 | common-objs += $(addprefix ../../../virt/kvm/, kvm_trace.o) | 8 | common-objs += $(addprefix ../../../virt/kvm/, kvm_trace.o) |
9 | endif | 9 | endif |
10 | ifeq ($(CONFIG_DMAR),y) | 10 | ifeq ($(CONFIG_IOMMU_API),y) |
11 | common-objs += $(addprefix ../../../virt/kvm/, iommu.o) | 11 | common-objs += $(addprefix ../../../virt/kvm/, iommu.o) |
12 | endif | 12 | endif |
13 | 13 | ||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0e6aa8141dc..cc17546a240 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/mman.h> | 35 | #include <linux/mman.h> |
36 | #include <linux/highmem.h> | 36 | #include <linux/highmem.h> |
37 | #include <linux/iommu.h> | ||
37 | #include <linux/intel-iommu.h> | 38 | #include <linux/intel-iommu.h> |
38 | 39 | ||
39 | #include <asm/uaccess.h> | 40 | #include <asm/uaccess.h> |
@@ -989,7 +990,7 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
989 | r = !tdp_enabled; | 990 | r = !tdp_enabled; |
990 | break; | 991 | break; |
991 | case KVM_CAP_IOMMU: | 992 | case KVM_CAP_IOMMU: |
992 | r = intel_iommu_found(); | 993 | r = iommu_found(); |
993 | break; | 994 | break; |
994 | default: | 995 | default: |
995 | r = 0; | 996 | r = 0; |