ARM/KVM: save and restore generic timer registers
authorAndre Przywara <andre.przywara@linaro.org>
Fri, 13 Dec 2013 13:23:26 +0000 (14:23 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:18:23 +0000 (17:18 +0200)
commit764ee339777196e8cf9fa090f5041b02efc93630
tree0801290140e034b4185f7ade76a4720fbaf5d621
parentb5a94dd48dc470624dcb7d581432a439d7a289c0
ARM/KVM: save and restore generic timer registers

For migration to work we need to save (and later restore) the state of
each core's virtual generic timer.
Since this is per VCPU, we can use the [gs]et_one_reg ioctl and export
the three needed registers (control, counter, compare value).
Though they live in cp15 space, we don't use the existing list, since
they need special accessor functions and the arch timer is optional.

Acked-by: Marc Zynger <marc.zyngier@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 39735a3a390431bcf60f9174b7d64f787fd6afa9)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/include/asm/kvm_host.h
arch/arm/include/uapi/asm/kvm.h
arch/arm/kvm/guest.c
arch/arm64/include/uapi/asm/kvm.h
virt/kvm/arm/arch_timer.c