hw: arm_gic_kvm: Add KVM VGIC save/restore logic
commit855011be05fad72e17e0280d0bab87a4bc840695
authorChristoffer Dall <christoffer.dall@linaro.org>
Wed, 26 Feb 2014 17:20:01 +0000 (26 17:20 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 26 Feb 2014 17:20:01 +0000 (26 17:20 +0000)
tree0e2e65900174f120517201cd859d37a5a32f589d
parent1da41cc1c6c3efbe2ed47228068bd80dbdc49d0e
hw: arm_gic_kvm: Add KVM VGIC save/restore logic

Save and restore the ARM KVM VGIC state from the kernel.  We rely on
QEMU to marshal the GICState data structure and therefore simply
synchronize the kernel state with the QEMU emulated state in both
directions.

We take some care on the restore path to check the VGIC has been
configured with enough IRQs and CPU interfaces that we can properly
restore the state, and for separate set/clear registers we first fully
clear the registers and then set the required bits.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1392687921-26921-1-git-send-email-christoffer.dall@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/intc/arm_gic_kvm.c