arm/arm64: KVM: vgic: handle out-of-range MMIO accesses
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 8 Jul 2014 11:09:04 +0000 (12:09 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:19:22 +0000 (17:19 +0200)
commit35a089f06fa6d1f02265be8b1e31e3775003d5c8
tree7603b6f0736a1d9ecb74e2ce94a709bbad473093
parent3e0fb55b4af81f2364b1969bdbf31bf67883a4d5
arm/arm64: KVM: vgic: handle out-of-range MMIO accesses

Now that we can (almost) dynamically size the number of interrupts,
we're facing an interesting issue:

We have to evaluate at runtime whether or not an access hits a valid
register, based on the sizing of this particular instance of the
distributor. Furthermore, the GIC spec says that accessing a reserved
register is RAZ/WI.

For this, add a new field to our range structure, indicating the number
of bits a single interrupts uses. That allows us to find out whether or
not the access is in range.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
(cherry picked from commit c3c918361adcceb816c92b21dd95d2b46fb96a8f)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
include/kvm/arm_vgic.h
virt/kvm/arm/vgic.c