KVM: arm-vgic: Make vgic mmio functions more generic
authorChristoffer Dall <christoffer.dall@linaro.org>
Mon, 23 Sep 2013 21:55:56 +0000 (14:55 -0700)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:18:25 +0000 (17:18 +0200)
commit405003b808d4ff3de73eebc18dfb6f1e708626c4
tree8fda131696de8ba57b3d7e42c40b352ef1f0082d
parent10b316b72589c7ba6f74c7263a289ffbaa1bf80b
KVM: arm-vgic: Make vgic mmio functions more generic

Rename the vgic_ranges array to vgic_dist_ranges to be more specific and
to prepare for handling CPU interface register access as well (for
save/restore of VGIC state).

Pass offset from distributor or interface MMIO base to
find_matching_range function instead of the physical address of the
access in the VM memory map.  This allows other callers unaware of the
VM specifics, but with generic VGIC knowledge to reuse the function.

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