Skip to content

Commit 03bd36a

Browse files
Lencerfoupton
authored andcommitted
KVM: Documentation: Enumerate allowed value macros of irq_type
The expression `irq_type[n]` may confuse readers to interpret `n` as the bit position and think of CPU = 1 << 0, SPI = 1 << 1, and PPI = 1 << 2. Since arch/arm64/include/uapi/asm/kvm.h already has macro definitions for the allowed values, this commit uses these symbols to clear up the ambiguity. Signed-off-by: Changyuan Lyu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent dc1d234 commit 03bd36a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Documentation/virt/kvm/api.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,12 +891,12 @@ like this::
891891

892892
The irq_type field has the following values:
893893

894-
- irq_type[0]:
894+
- KVM_ARM_IRQ_TYPE_CPU:
895895
out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQ
896-
- irq_type[1]:
896+
- KVM_ARM_IRQ_TYPE_SPI:
897897
in-kernel GIC: SPI, irq_id between 32 and 1019 (incl.)
898898
(the vcpu_index field is ignored)
899-
- irq_type[2]:
899+
- KVM_ARM_IRQ_TYPE_PPI:
900900
in-kernel GIC: PPI, irq_id between 16 and 31 (incl.)
901901

902902
(The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC specs)

0 commit comments

Comments
 (0)