]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: vgic-its: Implement ITS command queue command handlers
authorAndre Przywara <andre.przywara@arm.com>
Fri, 15 Jul 2016 11:43:36 +0000 (12:43 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 18 Jul 2016 17:14:38 +0000 (18:14 +0100)
commit9717f05dd0f233c6896641f4bc882b803adbf98a
treeb47cc6b90c6d4613fb2eb861c9c72f7936a14421
parent10f130fe2097f9344ef7bc0c1da50f34bccbd507
KVM: arm64: vgic-its: Implement ITS command queue command handlers

The connection between a device, an event ID, the LPI number and the
associated CPU is stored in in-memory tables in a GICv3, but their
format is not specified by the spec. Instead software uses a command
queue in a ring buffer to let an ITS implementation use its own
format.
Implement handlers for the various ITS commands and let them store
the requested relation into our own data structures. Those data
structures are protected by the its_lock mutex.
Our internal ring buffer read and write pointers are protected by the
its_cmd mutex, so that only one VCPU per ITS can handle commands at
any given time.
Error handling is very basic at the moment, as we don't have a good
way of communicating errors to the guest (usually an SError).
The INT command handler is missing from this patch, as we gain the
capability of actually injecting MSIs into the guest only later on.

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