diff options
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 | ||
| 587 | 4.24 KVM_CREATE_IRQCHIP | 587 | 4.24 KVM_CREATE_IRQCHIP |
| 588 | 588 | ||
| 589 | Capability: KVM_CAP_IRQCHIP | 589 | Capability: KVM_CAP_IRQCHIP, KVM_CAP_S390_IRQCHIP (s390) |
| 590 | Architectures: x86, ia64, ARM, arm64 | 590 | Architectures: x86, ia64, ARM, arm64, s390 |
| 591 | Type: vm ioctl | 591 | Type: vm ioctl |
| 592 | Parameters: none | 592 | Parameters: none |
| 593 | Returns: 0 on success, -1 on error | 593 | Returns: 0 on success, -1 on error |
| @@ -596,7 +596,10 @@ Creates an interrupt controller model in the kernel. On x86, creates a virtual | |||
| 596 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a | 596 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a |
| 597 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 | 597 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 |
| 598 | only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM/arm64, a GIC is | 598 | only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM/arm64, a GIC is |
| 599 | created. | 599 | created. On s390, a dummy irq routing table is created. |
| 600 | |||
| 601 | Note that on s390 the KVM_CAP_S390_IRQCHIP vm capability needs to be enabled | ||
| 602 | before KVM_CREATE_IRQCHIP can be used. | ||
| 600 | 603 | ||
| 601 | 604 | ||
| 602 | 4.25 KVM_IRQ_LINE | 605 | 4.25 KVM_IRQ_LINE |
| @@ -612,6 +615,20 @@ On some architectures it is required that an interrupt controller model has | |||
| 612 | been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered | 615 | been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered |
| 613 | interrupts require the level to be set to 1 and then back to 0. | 616 | interrupts require the level to be set to 1 and then back to 0. |
| 614 | 617 | ||
| 618 | On real hardware, interrupt pins can be active-low or active-high. This | ||
| 619 | does not matter for the level field of struct kvm_irq_level: 1 always | ||
| 620 | means active (asserted), 0 means inactive (deasserted). | ||
| 621 | |||
| 622 | x86 allows the operating system to program the interrupt polarity | ||
| 623 | (active-low/active-high) for level-triggered interrupts, and KVM used | ||
| 624 | to consider the polarity. However, due to bitrot in the handling of | ||
| 625 | active-low interrupts, the above convention is now valid on x86 too. | ||
| 626 | This is signaled by KVM_CAP_X86_IOAPIC_POLARITY_IGNORED. Userspace | ||
| 627 | should not present interrupts to the guest as active-low unless this | ||
| 628 | capability is present (or unless it is not using the in-kernel irqchip, | ||
| 629 | of course). | ||
| 630 | |||
| 631 | |||
| 615 | ARM/arm64 can signal an interrupt either at the CPU level, or at the | 632 | ARM/arm64 can signal an interrupt either at the CPU level, or at the |
| 616 | in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to | 633 | in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to |
| 617 | use PPIs designated for specific cpus. The irq field is interpreted | 634 | use 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 | ||
| 631 | In both cases, level is used to raise/lower the line. | 648 | In both cases, level is used to assert/deassert the line. |
| 632 | 649 | ||
| 633 | struct kvm_irq_level { | 650 | struct kvm_irq_level { |
| 634 | union { | 651 | union { |
| @@ -918,9 +935,9 @@ documentation when it pops into existence). | |||
| 918 | 935 | ||
| 919 | 4.37 KVM_ENABLE_CAP | 936 | 4.37 KVM_ENABLE_CAP |
| 920 | 937 | ||
| 921 | Capability: KVM_CAP_ENABLE_CAP | 938 | Capability: KVM_CAP_ENABLE_CAP, KVM_CAP_ENABLE_CAP_VM |
| 922 | Architectures: ppc, s390 | 939 | Architectures: ppc, s390 |
| 923 | Type: vcpu ioctl | 940 | Type: vcpu ioctl, vm ioctl (with KVM_CAP_ENABLE_CAP_VM) |
| 924 | Parameters: struct kvm_enable_cap (in) | 941 | Parameters: struct kvm_enable_cap (in) |
| 925 | Returns: 0 on success; -1 on error | ||
