Skip to content

Commit

Permalink
KVM: PPC: Document KVM_INTERRUPT ioctl
Browse files Browse the repository at this point in the history
This adds some documentation for the KVM_INTERRUPT special cases that
PowerPC now implements.

Signed-off-by: Alexander Graf <[email protected]>
  • Loading branch information
agraf authored and avikivity committed Oct 24, 2010
1 parent c5335f1 commit 6f7a2bd
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions Documentation/kvm/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320,22 +320,51 @@ struct kvm_translation {
4.15 KVM_INTERRUPT

Capability: basic
Architectures: x86
Architectures: x86, ppc
Type: vcpu ioctl
Parameters: struct kvm_interrupt (in)
Returns: 0 on success, -1 on error

Queues a hardware interrupt vector to be injected. This is only
useful if in-kernel local APIC is not used.
useful if in-kernel local APIC or equivalent is not used.

/* for KVM_INTERRUPT */
struct kvm_interrupt {
/* in */
__u32 irq;
};

X86:

Note 'irq' is an interrupt vector, not an interrupt pin or line.

PPC:

Queues an external interrupt to be injected. This ioctl is overleaded
with 3 different irq values:

a) KVM_INTERRUPT_SET

This injects an edge type external interrupt into the guest once it's ready
to receive interrupts. When injected, the interrupt is done.

b) KVM_INTERRUPT_UNSET

This unsets any pending interrupt.

Only available with KVM_CAP_PPC_UNSET_IRQ.

c) KVM_INTERRUPT_SET_LEVEL

This injects a level type external interrupt into the guest context. The
interrupt stays pending until a specific ioctl with KVM_INTERRUPT_UNSET
is triggered.

Only available with KVM_CAP_PPC_IRQ_LEVEL.

Note that any value for 'irq' other than the ones stated above is invalid
and incurs unexpected behavior.

4.16 KVM_DEBUG_GUEST

Capability: basic
Expand Down

0 comments on commit 6f7a2bd

Please sign in to comment.