diff options
| author | Alexander Graf <agraf@suse.de> | 2010-08-30 20:03:32 -0400 |
|---|---|---|
| committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:52:20 -0400 |
| commit | 6f7a2bd41fa8d52cbf5f32fdf8ba659d4ce4ae59 (patch) | |
| tree | 6615affe7c3561b08967cb9cf055e00dd1e3efd5 /Documentation/kvm | |
| parent | c5335f17651de5075313524ccc3881527268966f (diff) | |
KVM: PPC: Document KVM_INTERRUPT ioctl
This adds some documentation for the KVM_INTERRUPT special cases that
PowerPC now implements.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'Documentation/kvm')
| -rw-r--r-- | Documentation/kvm/api.txt | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 44d9893f9db1..24d634128746 100644 --- a/Documentation/kvm/api.txt +++ b/Documentation/kvm/api.txt | |||
| @@ -320,13 +320,13 @@ struct kvm_translation { | |||
| 320 | 4.15 KVM_INTERRUPT | 320 | 4.15 KVM_INTERRUPT |
| 321 | 321 | ||
| 322 | Capability: basic | 322 | Capability: basic |
| 323 | Architectures: x86 | 323 | Architectures: x86, ppc |
| 324 | Type: vcpu ioctl | 324 | Type: vcpu ioctl |
| 325 | Parameters: struct kvm_interrupt (in) | 325 | Parameters: struct kvm_interrupt (in) |
| 326 | Returns: 0 on success, -1 on error | 326 | Returns: 0 on success, -1 on error |
| 327 | 327 | ||
| 328 | Queues a hardware interrupt vector to be injected. This is only | 328 | Queues a hardware interrupt vector to be injected. This is only |
| 329 | useful if in-kernel local APIC is not used. | 329 | useful if in-kernel local APIC or equivalent is not used. |
| 330 | 330 | ||
| 331 | /* for KVM_INTERRUPT */ | 331 | /* for KVM_INTERRUPT */ |
| 332 | struct kvm_interrupt { | 332 | struct kvm_interrupt { |
| @@ -334,8 +334,37 @@ struct kvm_interrupt { | |||
| 334 | __u32 irq; | 334 | __u32 irq; |
| 335 | }; | 335 | }; |
| 336 | 336 | ||
| 337 | X86: | ||
| 338 | |||
| 337 | Note 'irq' is an interrupt vector, not an interrupt pin or line. | 339 | Note 'irq' is an interrupt vector, not an interrupt pin or line. |
| 338 | 340 | ||
| 341 | PPC: | ||
| 342 | |||
| 343 | Queues an external interrupt to be injected. This ioctl is overleaded | ||
| 344 | with 3 different irq values: | ||
| 345 | |||
| 346 | a) KVM_INTERRUPT_SET | ||
| 347 | |||
| 348 | This injects an edge type external interrupt into the guest once it's ready | ||
| 349 | to receive interrupts. When injected, the interrupt is done. | ||
| 350 | |||
| 351 | b) KVM_INTERRUPT_UNSET | ||
| 352 | |||
| 353 | This unsets any pending interrupt. | ||
| 354 | |||
| 355 | Only available with KVM_CAP_PPC_UNSET_IRQ. | ||
| 356 | |||
| 357 | c) KVM_INTERRUPT_SET_LEVEL | ||
| 358 | |||
| 359 | This injects a level type external interrupt into the guest context. The | ||
| 360 | interrupt stays pending until a specific ioctl with KVM_INTERRUPT_UNSET | ||
| 361 | is triggered. | ||
| 362 | |||
| 363 | Only available with KVM_CAP_PPC_IRQ_LEVEL. | ||
| 364 | |||
| 365 | Note that any value for 'irq' other than the ones stated above is invalid | ||
| 366 | and incurs unexpected behavior. | ||
| 367 | |||
| 339 | 4.16 KVM_DEBUG_GUEST | 368 | 4.16 KVM_DEBUG_GUEST |
| 340 | 369 | ||
| 341 | Capability: basic | 370 | Capability: basic |
