ARM: vITS: handle MAPTI/MAPI command
authorAndre Przywara <andre.przywara@arm.com>
Wed, 7 Sep 2016 00:49:37 +0000 (01:49 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 14 Jun 2017 18:38:38 +0000 (11:38 -0700)
commit5e8d02560acf228cbff8453115aae367022540d9
tree0c609b91959735ff81e5781385c596aaed499faf
parentbccfbe70a36fc0acd8ca2e3db9380a01938eae8a
ARM: vITS: handle MAPTI/MAPI command

The MAPTI commands associates a DeviceID/EventID pair with a LPI/CPU
pair and actually instantiates LPI interrupts. MAPI is just a variant
of this comment, where the LPI ID is the same as the event ID.
We connect the already allocated host LPI to this virtual LPI, so that
any triggering LPI on the host can be quickly forwarded to a guest.
Beside entering the domain and the virtual LPI number in the respective
host LPI entry, we also initialize and add the already allocated
struct pending_irq to our radix tree, so that we can now easily find it
by its virtual LPI number.
We also read the property table to update the enabled bit and the
priority for our new LPI, as we might have missed this during an earlier
INVALL call (which only checks mapped LPIs). But we make sure that the
property table is actually valid, as all redistributors might still
be disabled at this point.
Since write_itte() now sees its first usage, we change the declaration
to static.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/gic-v3-its.c
xen/arch/arm/vgic-v3-its.c
xen/include/asm-arm/gic_v3_its.h