]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: vgic-its: Implement MSI injection in ITS emulation
authorAndre Przywara <andre.przywara@arm.com>
Fri, 15 Jul 2016 11:43:37 +0000 (12:43 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 18 Jul 2016 17:14:38 +0000 (18:14 +0100)
commited14f1967158f38a7b57334fc0bcd7f1c5652934
treed703ea96114d917700aa5091c8287e844ce1b789
parent2146c6de9713ce67088fdae51e00f97a0085c677
KVM: arm64: vgic-its: Implement MSI injection in ITS emulation

When userland wants to inject an MSI into the guest, it uses the
KVM_SIGNAL_MSI ioctl, which carries the doorbell address along with
the payload and the device ID.
With the help of the KVM IO bus framework we learn the corresponding
ITS from the doorbell address. We then use our wrapper functions to
iterate the linked lists and find the proper Interrupt Translation Table
Entry (ITTE) and thus the corresponding struct vgic_irq to finally set
the pending bit.
We also provide the handler for the ITS "INT" command, which allows a
guest to trigger an MSI via the ITS command queue. Since this one knows
about the right ITS already, we directly call the MMIO handler function
without using the kvm_io_bus framework.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/vgic/vgic-its.c
virt/kvm/arm/vgic/vgic.h