aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2013-04-16 15:49:18 -0400
committerGleb Natapov <gleb@redhat.com>2013-04-28 05:58:56 -0400
commit2a5bab1004729f3302c776e53ee7c895b98bb1ce (patch)
tree281519b89e9f766a3d83c6978850e9eb72b3e0df /arch/ia64/kvm
parent064d1afaa5a60fc391d0b4b77599fc8f63f99cd3 (diff)
kvm: Allow build-time configuration of KVM device assignment
We hope to at some point deprecate KVM legacy device assignment in favor of VFIO-based assignment. Towards that end, allow legacy device assignment to be deconfigured. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Alexander Graf <agraf@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/ia64/kvm')
-rw-r--r--arch/ia64/kvm/Kconfig13
-rw-r--r--arch/ia64/kvm/Makefile6
-rw-r--r--arch/ia64/kvm/kvm-ia64.c2
3 files changed, 14 insertions, 7 deletions
diff --git a/arch/ia64/kvm/Kconfig b/arch/ia64/kvm/Kconfig
index 043183a06409..990b86420cc6 100644
--- a/arch/ia64/kvm/Kconfig
+++ b/arch/ia64/kvm/Kconfig
@@ -21,8 +21,6 @@ config KVM
21 tristate "Kernel-based Virtual Machine (KVM) support" 21 tristate "Kernel-based Virtual Machine (KVM) support"
22 depends on BROKEN 22 depends on BROKEN
23 depends on HAVE_KVM && MODULES 23 depends on HAVE_KVM && MODULES
24 # for device assignment:
25 depends on PCI
26 depends on BROKEN 24 depends on BROKEN
27 select PREEMPT_NOTIFIERS 25 select PREEMPT_NOTIFIERS
28 select ANON_INODES 26 select ANON_INODES
@@ -51,6 +49,17 @@ config KVM_INTEL
51 Provides support for KVM on Itanium 2 processors equipped with the VT 49 Provides support for KVM on Itanium 2 processors equipped with the VT
52 extensions. 50 extensions.
53 51
52config KVM_DEVICE_ASSIGNMENT
53 bool "KVM legacy PCI device assignment support"
54 depends on KVM && PCI && IOMMU_API
55 default y
56 ---help---
57 Provide support for legacy PCI device assignment through KVM. The
58 kernel now also supports a full featured userspace device driver
59 framework through VFIO, which supersedes much of this support.
60
61 If unsure, say Y.
62
54source drivers/vhost/Kconfig 63source drivers/vhost/Kconfig
55 64
56endif # VIRTUALIZATION 65endif # VIRTUALIZATION
diff --git a/arch/ia64/kvm/Makefile b/arch/ia64/kvm/Makefile
index 511f64a78d56..1a4053789d01 100644
--- a/arch/ia64/kvm/Makefile
+++ b/arch/ia64/kvm/Makefile
@@ -49,10 +49,10 @@ ccflags-y := -Ivirt/kvm -Iarch/ia64/kvm/
49asflags-y := -Ivirt/kvm -Iarch/ia64/kvm/ 49asflags-y := -Ivirt/kvm -Iarch/ia64/kvm/
50 50
51common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \ 51common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \
52 coalesced_mmio.o irq_comm.o assigned-dev.o irqchip.o) 52 coalesced_mmio.o irq_comm.o)
53 53
54ifeq ($(CONFIG_IOMMU_API),y) 54ifeq ($(CONFIG_KVM_DEVICE_ASSIGNMENT),y)
55common-objs += $(addprefix ../../../virt/kvm/, iommu.o) 55common-objs += $(addprefix ../../../virt/kvm/, assigned-dev.o iommu.o)
56endif 56endif
57 57
58kvm-objs := $(common-objs) kvm-ia64.o kvm_fw.o 58kvm-objs := $(common-objs) kvm-ia64.o kvm_fw.o
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 032c54d63c3d..dcc560729c20 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -1368,9 +1368,7 @@ void kvm_arch_sync_events(struct kvm *kvm)
1368void kvm_arch_destroy_vm(struct kvm *kvm) 1368void kvm_arch_destroy_vm(struct kvm *kvm)
1369{ 1369{
1370 kvm_iommu_unmap_guest(kvm); 1370 kvm_iommu_unmap_guest(kvm);
1371#ifdef KVM_CAP_DEVICE_ASSIGNMENT
1372 kvm_free_all_assigned_devices(kvm); 1371 kvm_free_all_assigned_devices(kvm);
1373#endif
1374 kfree(kvm->arch.vioapic); 1372 kfree(kvm->arch.vioapic);
1375 kvm_release_vm_pages(kvm); 1373 kvm_release_vm_pages(kvm);
1376} 1374}