ARM: new VGIC: Add ACTIVE registers handlers
authorAndre Przywara <andre.przywara@linaro.org>
Wed, 7 Feb 2018 15:52:48 +0000 (15:52 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 28 Mar 2018 18:15:54 +0000 (11:15 -0700)
commitf1b7167b41984d3e54362ee1c01a7781f19f2969
tree03da6f735d3315258d6a897f72d8571e5ca7df4e
parent4feaf88d32b83fcaed1296bfa0a4ed59d9e36407
ARM: new VGIC: Add ACTIVE registers handlers

The active register handlers are shared between the v2 and v3 emulation,
so their implementation goes into vgic-mmio.c, to be easily referenced
from the v3 emulation as well later.
Since activation/deactivation of an interrupt may happen entirely in the
guest without it ever exiting, we need some extra logic to properly track
the active state.
For clearing the active state, we would basically have to halt the guest
to make sure this is properly propagated into the respective VCPUs.
This is not yet implemented in Xen.
Fortunately this feature is mostly used to reset a just in initialised
GIC, so chances are we are tasked to clear bits that are already zero.
Add a simple check to avoid pointless warnings in this case.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/vgic/vgic-mmio-v2.c
xen/arch/arm/vgic/vgic-mmio.c
xen/arch/arm/vgic/vgic-mmio.h