aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/virtual
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2012-09-21 13:58:03 -0400
committerAvi Kivity <avi@redhat.com>2012-09-23 07:50:15 -0400
commit7a84428af7ca6a847f058c9ff244a18a2664fd1b (patch)
treee6c573c701736a75d618b670d66e98398b62769f /Documentation/virtual
parent1e08ec4a130e2745d96df169e67c58df98a07311 (diff)
KVM: Add resampling irqfds for level triggered interrupts
To emulate level triggered interrupts, add a resample option to KVM_IRQFD. When specified, a new resamplefd is provided that notifies the user when the irqchip has been resampled by the VM. This may, for instance, indicate an EOI. Also in this mode, posting of an interrupt through an irqfd only asserts the interrupt. On resampling, the interrupt is automatically de-asserted prior to user notification. This enables level triggered interrupts to be posted and re-enabled from vfio with no userspace intervention. All resampling irqfds can make use of a single irq source ID, so we reserve a new one for this interface. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'Documentation/virtual')
-rw-r--r--Documentation/virtual/kvm/api.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 36befa775fdb..f6ec3a92e621 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1950,6 +1950,19 @@ the guest using the specified gsi pin. The irqfd is removed using
1950the KVM_IRQFD_FLAG_DEASSIGN flag, specifying both kvm_irqfd.fd 1950the KVM_IRQFD_FLAG_DEASSIGN flag, specifying both kvm_irqfd.fd
1951and kvm_irqfd.gsi. 1951and kvm_irqfd.gsi.
1952 1952
1953With KVM_CAP_IRQFD_RESAMPLE, KVM_IRQFD supports a de-assert and notify
1954mechanism allowing emulation of level-triggered, irqfd-based
1955interrupts. When KVM_IRQFD_FLAG_RESAMPLE is set the user must pass an
1956additional eventfd in the kvm_irqfd.resamplefd field. When operating
1957in resample mode, posting of an interrupt through kvm_irq.fd asserts
1958the specified gsi in the irqchip. When the irqchip is resampled, such
1959as from an EOI, the gsi is de-asserted and the user is notifed via
1960kvm_irqfd.resamplefd. It is the user's responsibility to re-queue
1961the interrupt if the device making use of it still requires service.
1962Note that closing the resamplefd is not sufficient to disable the
1963irqfd. The KVM_IRQFD_FLAG_RESAMPLE is only necessary on assignment
1964and need not be specified with KVM_IRQFD_FLAG_DEASSIGN.
1965
19534.76 KVM_PPC_ALLOCATE_HTAB 19664.76 KVM_PPC_ALLOCATE_HTAB
1954 1967
1955Capability: KVM_CAP_PPC_ALLOC_HTAB 1968Capability: KVM_CAP_PPC_ALLOC_HTAB