diff options
author | Avi Kivity <avi@redhat.com> | 2009-08-23 10:08:04 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 03:46:55 -0400 |
commit | 5dadbfd64724c41716d4fc82df6f01b023d5b15d (patch) | |
tree | 78dc2c620f4e0bd49d81e4ca9a01c208de800d50 /Documentation/kvm/api.txt | |
parent | 88c808fd42b53a7e01a2ac3253ef31fef74cb5af (diff) |
KVM: Document KVM_CAP_IRQCHIP
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'Documentation/kvm/api.txt')
-rw-r--r-- | Documentation/kvm/api.txt | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 1b1c22da211b..5a4bc8cf6d04 100644 --- a/Documentation/kvm/api.txt +++ b/Documentation/kvm/api.txt | |||
@@ -517,6 +517,82 @@ struct kvm_fpu { | |||
517 | __u32 pad2; | 517 | __u32 pad2; |
518 | }; | 518 | }; |
519 | 519 | ||
520 | 4.23 KVM_CREATE_IRQCHIP | ||
521 | |||
522 | Capability: KVM_CAP_IRQCHIP | ||
523 | Architectures: x86, ia64 | ||
524 | Type: vm ioctl | ||
525 | Parameters: none | ||
526 | Returns: 0 on success, -1 on error | ||
527 | |||
528 | Creates an interrupt controller model in the kernel. On x86, creates a virtual | ||
529 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a | ||
530 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 | ||
531 | only go to the IOAPIC. On ia64, a IOSAPIC is created. | ||
532 | |||
533 | 4.24 KVM_IRQ_LINE | ||
534 | |||
535 | Capability: KVM_CAP_IRQCHIP | ||
536 | Architectures: x86, ia64 | ||
537 | Type: vm ioctl | ||
538 | Parameters: struct kvm_irq_level | ||
539 | Returns: 0 on success, -1 on error | ||
540 | |||
541 | Sets the level of a GSI input to the interrupt controller model in the kernel. | ||
542 | Requires that an interrupt controller model has been previously created with | ||
543 | KVM_CREATE_IRQCHIP. Note that edge-triggered interrupts require the level | ||
544 | to be set to 1 and then back to 0. | ||
545 | |||
546 | struct kvm_irq_level { | ||
547 | union { | ||
548 | __u32 irq; /* GSI */ | ||
549 | __s32 status; /* not used for KVM_IRQ_LEVEL */ | ||
550 | }; | ||
551 | __u32 level; /* 0 or 1 */ | ||
552 | }; | ||
553 | |||
554 | 4.25 KVM_GET_IRQCHIP | ||
555 | |||
556 | Capability: KVM_CAP_IRQCHIP | ||
557 | Architectures: x86, ia64 | ||
558 | Type: vm ioctl | ||
559 | Parameters: struct kvm_irqchip (in/out) | ||
560 | Returns: 0 on success, -1 on error | ||
561 | |||
562 | Reads the state of a kernel interrupt controller created with | ||
563 | KVM_CREATE_IRQCHIP into a buffer provided by the caller. | ||
564 | |||
565 | struct kvm_irqchip { | ||
566 | __u32 chip_id; /* 0 = PIC1, 1 = PIC2, 2 = IOAPIC */ | ||
567 | __u32 pad; | ||
568 | union { | ||
569 | char dummy[512]; /* reserving space */ | ||
570 | struct kvm_pic_state pic; | ||
571 | struct kvm_ioapic_state ioapic; | ||
572 | } chip; | ||
573 | }; | ||
574 | |||
575 | 4.26 KVM_SET_IRQCHIP | ||
576 | |||
577 | Capability: KVM_CAP_IRQCHIP | ||
578 | Architectures: x86, ia64 | ||
579 | Type: vm ioctl | ||
580 | Parameters: struct kvm_irqchip (in) | ||
581 | Returns: 0 on success, -1 on error | ||
582 | |||
583 | Sets the state of a kernel interrupt controller created with | ||
584 | KVM_CREATE_IRQCHIP from a buffer provided by the caller. | ||
585 | |||
586 | struct kvm_irqchip { | ||
587 | __u32 chip_id; /* 0 = PIC1, 1 = PIC2, 2 = IOAPIC */ | ||
588 | __u32 pad; | ||
589 | union { | ||
590 | char dummy[512]; /* reserving space */ | ||
591 | struct kvm_pic_state pic; | ||
592 | struct kvm_ioapic_state ioapic; | ||
593 | } chip; | ||
594 | }; | ||
595 | |||
520 | 5. The kvm_run structure | 596 | 5. The kvm_run structure |
521 | 597 | ||
522 | Application code obtains a pointer to the kvm_run structure by | 598 | Application code obtains a pointer to the kvm_run structure by |