linux/Documentation/virtual/kvm
Christoffer Dall 86ce85352f KVM: ARM: Inject IRQs and FIQs from userspace
All interrupt injection is now based on the VM ioctl KVM_IRQ_LINE.  This
works semantically well for the GIC as we in fact raise/lower a line on
a machine component (the gic).  The IOCTL uses the follwing struct.

struct kvm_irq_level {
	union {
		__u32 irq;     /* GSI */
		__s32 status;  /* not used for KVM_IRQ_LEVEL */
	};
	__u32 level;           /* 0 or 1 */
};

ARM can signal an interrupt either at the CPU level, or at the in-kernel irqchip
(GIC), and for in-kernel irqchip can tell the GIC to use PPIs designated for
specific cpus.  The irq field is interpreted like this:

  bits:  | 31 ... 24 | 23  ... 16 | 15    ...    0 |
  field: | irq_type  | vcpu_index |   irq_number   |

The irq_type field has the following values:
- irq_type[0]: out-of-kernel GIC: irq_number 0 is IRQ, irq_number 1 is FIQ
- irq_type[1]: in-kernel GIC: SPI, irq_number between 32 and 1019 (incl.)
               (the vcpu_index field is ignored)
- irq_type[2]: in-kernel GIC: PPI, irq_number between 16 and 31 (incl.)

The irq_number thus corresponds to the irq ID in as in the GICv2 specs.

This is documented in Documentation/kvm/api.txt.

Reviewed-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
2013-01-23 13:29:12 -05:00
..
api.txt KVM: ARM: Inject IRQs and FIQs from userspace 2013-01-23 13:29:12 -05:00
cpuid.txt KVM: fix cpuid eax for KVM leaf 2012-05-06 15:51:56 +03:00
hypercalls.txt KVM: Add documentation on hypercalls 2012-08-13 17:39:59 -03:00
locking.txt KVM: MMU: document mmu-lock and fast page fault 2012-07-11 16:51:23 +03:00
mmu.txt Documentation: Fix multiple typo in Documentation 2012-03-07 16:08:24 +01:00
msr.txt KVM: clarify kvmclock documentation 2012-09-17 14:10:23 -03:00
nested-vmx.txt
ppc-pv.txt KVM: Add ppc hypercall documentation 2012-08-13 17:39:59 -03:00
review-checklist.txt
timekeeping.txt