]> www.infradead.org Git - nvme.git/commitdiff
KVM: Documentation: Enumerate allowed value macros of `irq_type`
authorChangyuan Lyu <changyuanl@google.com>
Sun, 23 Jun 2024 16:45:40 +0000 (09:45 -0700)
committerOliver Upton <oliver.upton@linux.dev>
Fri, 28 Jun 2024 22:00:18 +0000 (22:00 +0000)
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 <changyuanl@google.com>
Link: https://lore.kernel.org/r/20240623164542.2999626-2-changyuanl@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Documentation/virt/kvm/api.rst

index e623f072e9aca2ca735627ffb314c6a3a145f1fc..5f45f3e584fdb0e5c67ee1c1e48b71c7cfff4001 100644 (file)
@@ -891,12 +891,12 @@ like this::
 
 The irq_type field has the following values:
 
-- irq_type[0]:
+- KVM_ARM_IRQ_TYPE_CPU:
               out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQ
-- irq_type[1]:
+- KVM_ARM_IRQ_TYPE_SPI:
               in-kernel GIC: SPI, irq_id between 32 and 1019 (incl.)
                (the vcpu_index field is ignored)
-- irq_type[2]:
+- KVM_ARM_IRQ_TYPE_PPI:
               in-kernel GIC: PPI, irq_id between 16 and 31 (incl.)
 
 (The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC specs)