aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/virtual/kvm/api.txt47
-rw-r--r--Documentation/virtual/kvm/devices/s390_flic.txt91
-rw-r--r--arch/arm/include/asm/kvm_arm.h4
-rw-r--r--arch/arm/include/asm/kvm_asm.h4
-rw-r--r--arch/arm/include/asm/kvm_host.h9
-rw-r--r--arch/arm/include/asm/kvm_mmu.h30
-rw-r--r--arch/arm/kernel/asm-offsets.c1
-rw-r--r--arch/arm/kvm/coproc.c84
-rw-r--r--arch/arm/kvm/coproc.h14
-rw-r--r--arch/arm/kvm/coproc_a15.c2
-rw-r--r--arch/arm/kvm/coproc_a7.c2
-rw-r--r--arch/arm/kvm/guest.c1
-rw-r--r--arch/arm/kvm/interrupts_head.S21
-rw-r--r--arch/arm/kvm/mmu.c110
-rw-r--r--arch/arm64/include/asm/kvm_arm.h3
-rw-r--r--arch/arm64/include/asm/kvm_asm.h3
-rw-r--r--arch/arm64/include/asm/kvm_mmu.h22
-rw-r--r--arch/arm64/kvm/sys_regs.c99
-rw-r--r--arch/arm64/kvm/sys_regs.h2
-rw-r--r--arch/ia64/kvm/kvm-ia64.c1
-rw-r--r--arch/mips/include/asm/kvm_host.h417
-rw-r--r--arch/mips/kvm/kvm_mips_emul.c40
-rw-r--r--arch/powerpc/include/asm/kvm_book3s.h5
-rw-r--r--arch/powerpc/include/asm/kvm_book3s_64.h12
-rw-r--r--arch/powerpc/include/asm/kvm_book3s_asm.h2
-rw-r--r--arch/powerpc/include/asm/kvm_ppc.h2
-rw-r--r--arch/powerpc/include/asm/reg.h1
-rw-r--r--arch/powerpc/include/asm/tm.h4
-rw-r--r--arch/powerpc/kvm/book3s_64_mmu_hv.c9
-rw-r--r--arch/powerpc/kvm/book3s_64_vio_hv.c28
-rw-r--r--arch/powerpc/kvm/book3s_hv.c159
-rw-r--r--arch/powerpc/kvm/book3s_hv_interrupts.S22
-rw-r--r--arch/powerpc/kvm/book3s_hv_rm_mmu.c6
-rw-r--r--arch/powerpc/kvm/book3s_hv_rmhandlers.S187
-rw-r--r--arch/powerpc/kvm/book3s_rtas.c7
-rw-r--r--arch/s390/include/asm/irq.h1
-rw-r--r--arch/s390/include/asm/kvm_host.h98
-rw-r--r--arch/s390/include/asm/pgtable.h2
-rw-r--r--arch/s390/include/asm/processor.h1
-rw-r--r--arch/s390/include/uapi/asm/kvm.h43
-rw-r--r--arch/s390/kernel/irq.c1
-rw-r--r--arch/s390/kvm/Kconfig4
-rw-r--r--arch/s390/kvm/Makefile2
-rw-r--r--arch/s390/kvm/diag.c84
-rw-r--r--arch/s390/kvm/interrupt.c704
-rw-r--r--arch/s390/kvm/irq.h22
-rw-r--r--arch/s390/kvm/kvm-s390.c212
-rw-r--r--arch/s390/kvm/kvm-s390.h7
-rw-r--r--arch/s390/kvm/priv.c7
-rw-r--r--arch/s390/kvm/sigp.c157
-rw-r--r--arch/s390/kvm/trace.h46
-rw-r--r--arch/s390/mm/fault.c26
-rw-r--r--arch/x86/include/asm/kvm_host.h18
-rw-r--r--arch/x86/include/asm/vmx.h4
-rw-r--r--arch/x86/include/asm/xsave.h2
-rw-r--r--arch/x86/include/uapi/asm/msr-index.h1
-rw-r--r--arch/x86/kernel/kvm.c1
-rw-r--r--arch/x86/kernel/kvmclock.c2
-rw-r--r--arch/x86/kvm/cpuid.c37
-rw-r--r--arch/x86/kvm/emulate.c8
-rw-r--r--arch/x86/kvm/mmu.c2
-rw-r--r--arch/x86/kvm/paging_tmpl.h7
-rw-r--r--arch/x86/kvm/svm.c84
-rw-r--r--arch/x86/kvm/vmx.c334
-rw-r--r--arch/x86/kvm/x86.c145
-rw-r--r--arch/x86/kvm/x86.h5
-rw-r--r--drivers/s390/kvm/virtio_ccw.c323
-rw-r--r--include/linux/kvm_host.h20
-rw-r--r--include/uapi/linux/kvm.h83
-rw-r--r--virt/kvm/Kconfig4
-rw-r--r--virt/kvm/async_pf.c27
-rw-r--r--virt/kvm/eventfd.c8
-rw-r--r--virt/kvm/ioapic.c108
-rw-r--r--virt/kvm/kvm_main.c12
74 files changed, 3265 insertions, 838 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 6cd63a9010fb..c24211da4120 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -586,8 +586,8 @@ struct kvm_fpu {
586 586
5874.24 KVM_CREATE_IRQCHIP 5874.24 KVM_CREATE_IRQCHIP
588 588
589Capability: KVM_CAP_IRQCHIP 589Capability: KVM_CAP_IRQCHIP, KVM_CAP_S390_IRQCHIP (s390)
590Architectures: x86, ia64, ARM, arm64 590Architectures: x86, ia64, ARM, arm64, s390
591Type: vm ioctl 591Type: vm ioctl
592Parameters: none 592Parameters: none
593Returns: 0 on success, -1 on error 593Returns: 0 on success, -1 on error
@@ -596,7 +596,10 @@ Creates an interrupt controller model in the kernel. On x86, creates a virtual
596ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a 596ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a
597local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 597local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23
598only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM/arm64, a GIC is 598only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM/arm64, a GIC is
599created. 599created. On s390, a dummy irq routing table is created.
600
601Note that on s390 the KVM_CAP_S390_IRQCHIP vm capability needs to be enabled
602before KVM_CREATE_IRQCHIP can be used.
600 603
601 604
6024.25 KVM_IRQ_LINE 6054.25 KVM_IRQ_LINE
@@ -612,6 +615,20 @@ On some architectures it is required that an interrupt controller model has
612been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered 615been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered
613interrupts require the level to be set to 1 and then back to 0. 616interrupts require the level to be set to 1 and then back to 0.
614 617
618On real hardware, interrupt pins can be active-low or active-high. This
619does not matter for the level field of struct kvm_irq_level: 1 always
620means active (asserted), 0 means inactive (deasserted).
621
622x86 allows the operating system to program the interrupt polarity
623(active-low/active-high) for level-triggered interrupts, and KVM used
624to consider the polarity. However, due to bitrot in the handling of
625active-low interrupts, the above convention is now valid on x86 too.
626This is signaled by KVM_CAP_X86_IOAPIC_POLARITY_IGNORED. Userspace
627should not present interrupts to the guest as active-low unless this
628capability is present (or unless it is not using the in-kernel irqchip,
629of course).
630
631
615ARM/arm64 can signal an interrupt either at the CPU level, or at the 632ARM/arm64 can signal an interrupt either at the CPU level, or at the
616in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to 633in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to
617use PPIs designated for specific cpus. The irq field is interpreted 634use PPIs designated for specific cpus. The irq field is interpreted
@@ -628,7 +645,7 @@ The irq_type field has the following values:
628 645
629(The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC specs) 646(The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC specs)
630 647
631In both cases, level is used to raise/lower the line. 648In both cases, level is used to assert/deassert the line.
632 649
633struct kvm_irq_level { 650struct kvm_irq_level {
634 union { 651 union {
@@ -918,9 +935,9 @@ documentation when it pops into existence).
918 935
9194.37 KVM_ENABLE_CAP 9364.37 KVM_ENABLE_CAP
920 937
921Capability: KVM_CAP_ENABLE_CAP 938Capability: KVM_CAP_ENABLE_CAP, KVM_CAP_ENABLE_CAP_VM
922Architectures: ppc, s390 939Architectures: ppc, s390
923Type: vcpu ioctl 940Type: vcpu ioctl, vm ioctl (with KVM_CAP_ENABLE_CAP_VM)
924Parameters: struct kvm_enable_cap (in) 941Parameters: struct kvm_enable_cap (in)
925Returns: 0 on success; -1 on error