aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-05 17:47:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-05 17:47:31 -0400
commit01227a889ed56ae53aeebb9f93be9d54dd8b2de8 (patch)
treed5eba9359a9827e84d4112b84d48c54df5c5acde /arch/ia64/kvm
parent9e6879460c8edb0cd3c24c09b83d06541b5af0dc (diff)
parentdb6ae6158186a17165ef990bda2895ae7594b039 (diff)
Merge tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm updates from Gleb Natapov: "Highlights of the updates are: general: - new emulated device API - legacy device assignment is now optional - irqfd interface is more generic and can be shared between arches x86: - VMCS shadow support and other nested VMX improvements - APIC virtualization and Posted Interrupt hardware support - Optimize mmio spte zapping ppc: - BookE: in-kernel MPIC emulation with irqfd support - Book3S: in-kernel XICS emulation (incomplete) - Book3S: HV: migration fixes - BookE: more debug support preparation - BookE: e6500 support ARM: - reworking of Hyp idmaps s390: - ioeventfd for virtio-ccw And many other bug fixes, cleanups and improvements" * tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (204 commits) kvm: Add compat_ioctl for device control API KVM: x86: Account for failing enable_irq_window for NMI window request KVM: PPC: Book3S: Add API for in-kernel XICS emulation kvm/ppc/mpic: fix missing unlock in set_base_addr() kvm/ppc: Hold srcu lock when calling kvm_io_bus_read/write kvm/ppc/mpic: remove users kvm/ppc/mpic: fix mmio region lists when multiple guests used kvm/ppc/mpic: remove default routes from documentation kvm: KVM_CAP_IOMMU only available with device assignment ARM: KVM: iterate over all CPUs for CPU compatibility check KVM: ARM: Fix spelling in error message ARM: KVM: define KVM_ARM_MAX_VCPUS unconditionally KVM: ARM: Fix API documentation for ONE_REG encoding ARM: KVM: promote vfp_host pointer to generic host cpu context ARM: KVM: add architecture specific hook for capabilities ARM: KVM: perform HYP initilization for hotplugged CPUs ARM: KVM: switch to a dual-step HYP init code ARM: KVM: rework HYP page table freeing ARM: KVM: enforce maximum size for identity mapped code ARM: KVM: move to a KVM provided HYP idmap ...
Diffstat (limited to 'arch/ia64/kvm')
-rw-r--r--arch/ia64/kvm/Kconfig14
-rw-r--r--arch/ia64/kvm/Makefile6
-rw-r--r--arch/ia64/kvm/kvm-ia64.c35
-rw-r--r--arch/ia64/kvm/lapic.h6
4 files changed, 24 insertions, 37 deletions
diff --git a/arch/ia64/kvm/Kconfig b/arch/ia64/kvm/Kconfig
index 2cd225f8c68d..990b86420cc6 100644
--- a/arch/ia64/kvm/Kconfig
+++ b/arch/ia64/kvm/Kconfig
@@ -21,12 +21,11 @@ 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
29 select HAVE_KVM_IRQCHIP 27 select HAVE_KVM_IRQCHIP
28 select HAVE_KVM_IRQ_ROUTING
30 select KVM_APIC_ARCHITECTURE 29 select KVM_APIC_ARCHITECTURE
31 select KVM_MMIO 30 select KVM_MMIO
32 ---help--- 31 ---help---
@@ -50,6 +49,17 @@ config KVM_INTEL
50 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
51 extensions. 50 extensions.
52 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
53source drivers/vhost/Kconfig 63source drivers/vhost/Kconfig
54 64
55endif # VIRTUALIZATION 65endif # VIRTUALIZATION
diff --git a/arch/ia64/kvm/Makefile b/arch/ia64/kvm/Makefile
index db3d7c5d1071..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) 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 ad3126a58644..5b2dc0d10c8f 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -204,9 +204,11 @@ int kvm_dev_ioctl_check_extension(long ext)
204 case KVM_CAP_COALESCED_MMIO: 204 case KVM_CAP_COALESCED_MMIO:
205 r = KVM_COALESCED_MMIO_PAGE_OFFSET; 205 r = KVM_COALESCED_MMIO_PAGE_OFFSET;
206 break; 206 break;
207#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
207 case KVM_CAP_IOMMU: 208 case KVM_CAP_IOMMU:
208 r = iommu_present(&pci_bus_type); 209 r = iommu_present(&pci_bus_type);
209 break; 210 break;
211#endif
210 default: 212 default:
211 r = 0; 213 r = 0;
212 } 214 }
@@ -924,13 +926,15 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
924 return 0; 926 return 0;
925} 927}
926 928
927int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_event) 929int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_event,
930 bool line_status)
928{ 931{
929 if (!irqchip_in_kernel(kvm)) 932 if (!irqchip_in_kernel(kvm))
930 return -ENXIO; 933 return -ENXIO;
931 934
932 irq_event->status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, 935 irq_event->status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID,
933 irq_event->irq, irq_event->level); 936 irq_event->irq, irq_event->level,
937 line_status);
934 return 0; 938 return 0;
935} 939}
936 940
@@ -942,24 +946,6 @@ long kvm_arch_vm_ioctl(struct file *filp,
942 int r = -ENOTTY; 946 int r = -ENOTTY;
943 947
944 switch (ioctl) { 948 switch (ioctl) {
945 case KVM_SET_MEMORY_REGION: {
946 struct kvm_memory_region kvm_mem;
947 struct kvm_userspace_memory_region kvm_userspace_mem;
948
949 r = -EFAULT;
950 if (copy_from_user(&kvm_mem, argp, sizeof kvm_mem))
951 goto out;
952 kvm_userspace_mem.slot = kvm_mem.slot;
953 kvm_userspace_mem.flags = kvm_mem.flags;
954 kvm_userspace_mem.guest_phys_addr =
955 kvm_mem.guest_phys_addr;
956 kvm_userspace_mem.memory_size = kvm_mem.memory_size;
957 r = kvm_vm_ioctl_set_memory_region(kvm,
958 &kvm_userspace_mem, false);
959 if (r)
960 goto out;
961 break;
962 }
963 case KVM_CREATE_IRQCHIP: 949 case KVM_CREATE_IRQCHIP:
964 r = -EFAULT; 950 r = -EFAULT;
965 r = kvm_ioapic_init(kvm); 951 r = kvm_ioapic_init(kvm);
@@ -1384,9 +1370,7 @@ void kvm_arch_sync_events(struct kvm *kvm)
1384void kvm_arch_destroy_vm(struct kvm *kvm) 1370void kvm_arch_destroy_vm(struct kvm *kvm)
1385{ 1371{
1386 kvm_iommu_unmap_guest(kvm); 1372 kvm_iommu_unmap_guest(kvm);
1387#ifdef KVM_CAP_DEVICE_ASSIGNMENT
1388 kvm_free_all_assigned_devices(kvm); 1373 kvm_free_all_assigned_devices(kvm);
1389#endif
1390 kfree(kvm->arch.vioapic); 1374 kfree(kvm->arch.vioapic);
1391 kvm_release_vm_pages(kvm); 1375 kvm_release_vm_pages(kvm);
1392} 1376}
@@ -1578,9 +1562,8 @@ int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages)
1578 1562
1579int kvm_arch_prepare_memory_region(struct kvm *kvm, 1563int kvm_arch_prepare_memory_region(struct kvm *kvm,
1580 struct kvm_memory_slot *memslot, 1564 struct kvm_memory_slot *memslot,
1581 struct kvm_memory_slot old,
1582 struct kvm_userspace_memory_region *mem, 1565 struct kvm_userspace_memory_region *mem,
1583 bool user_alloc) 1566 enum kvm_mr_change change)
1584{ 1567{
1585 unsigned long i; 1568 unsigned long i;
1586 unsigned long pfn; 1569 unsigned long pfn;
@@ -1610,8 +1593,8 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
1610 1593
1611void kvm_arch_commit_memory_region(struct kvm *kvm, 1594void kvm_arch_commit_memory_region(struct kvm *kvm,
1612 struct kvm_userspace_memory_region *mem, 1595 struct kvm_userspace_memory_region *mem,
1613 struct kvm_memory_slot old, 1596 const struct kvm_memory_slot *old,
1614 bool user_alloc) 1597 enum kvm_mr_change change)
1615{ 1598{
1616 return; 1599 return;
1617} 1600}
diff --git a/arch/ia64/kvm/lapic.h b/arch/ia64/kvm/lapic.h
index c3e2935b6db4..c5f92a926a9a 100644
--- a/arch/ia64/kvm/lapic.h
+++ b/arch/ia64/kvm/lapic.h
@@ -27,10 +27,4 @@ int kvm_apic_set_irq(struct kvm_vcpu *vcpu, struct kvm_lapic_irq *irq);
27#define kvm_apic_present(x) (true) 27#define kvm_apic_present(x) (true)
28#define kvm_lapic_enabled(x) (true) 28#define kvm_lapic_enabled(x) (true)
29 29
30static inline bool kvm_apic_vid_enabled(void)
31{
32 /* IA64 has no apicv supporting, do nothing here */
33 return false;
34}
35
36#endif 30#endif