Commit 19de40a8 authored by Joerg Roedel's avatar Joerg Roedel
Browse files

KVM: change KVM to use IOMMU API

parent 1aaf1183
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -467,7 +467,7 @@ struct kvm_arch {
	struct kvm_sal_data rdv_sal_data;

	struct list_head assigned_dev_head;
	struct dmar_domain *intel_iommu_domain;
	struct iommu_domain *iommu_domain;
	struct hlist_head irq_ack_notifier_list;

	unsigned long irq_sources_bitmap;
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ EXTRA_AFLAGS += -Ivirt/kvm -Iarch/ia64/kvm/
common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \
		coalesced_mmio.o irq_comm.o)

ifeq ($(CONFIG_DMAR),y)
ifeq ($(CONFIG_IOMMU_API),y)
common-objs += $(addprefix ../../../virt/kvm/, iommu.o)
endif

+2 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include <linux/bitops.h>
#include <linux/hrtimer.h>
#include <linux/uaccess.h>
#include <linux/iommu.h>
#include <linux/intel-iommu.h>

#include <asm/pgtable.h>
@@ -188,7 +189,7 @@ int kvm_dev_ioctl_check_extension(long ext)
		r = KVM_COALESCED_MMIO_PAGE_OFFSET;
		break;
	case KVM_CAP_IOMMU:
		r = intel_iommu_found();
		r = iommu_found();
		break;
	default:
		r = 0;
+1 −1
Original line number Diff line number Diff line
@@ -360,7 +360,7 @@ struct kvm_arch{
	struct list_head active_mmu_pages;
	struct list_head assigned_dev_head;
	struct list_head oos_global_pages;
	struct dmar_domain *intel_iommu_domain;
	struct iommu_domain *iommu_domain;
	struct kvm_pic *vpic;
	struct kvm_ioapic *vioapic;
	struct kvm_pit *vpit;
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \
ifeq ($(CONFIG_KVM_TRACE),y)
common-objs += $(addprefix ../../../virt/kvm/, kvm_trace.o)
endif
ifeq ($(CONFIG_DMAR),y)
ifeq ($(CONFIG_IOMMU_API),y)
common-objs += $(addprefix ../../../virt/kvm/, iommu.o)
endif

Loading