diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2013-11-16 10:51:25 -0800 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-04-30 11:14:59 +0200 |
commit | f3ad05f6c31a18c83d46d234a32769f151c46593 (patch) | |
tree | 51f12ddd5bbcbb20f9e04552ad1a8ff40bf4cc77 /arch | |
parent | 0057950da5b287bbc3885872c98c57ee33bb26c5 (diff) |
arm/arm64: KVM: arch_timer: Initialize cntvoff at kvm_init
commit a1a64387adeeba7a34ce06f2774e81f496ee803b upstream.
Initialize the cntvoff at kvm_init_vm time, not before running the VCPUs
at the first time because that will overwrite any potentially restored
values from user space.
Cc: Andre Przywara <andre.przywara@linaro.org>
Acked-by: Marc Zynger <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kvm/arm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 9c697db2787e..847d2804253c 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -137,6 +137,8 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) if (ret) goto out_free_stage2_pgd; + kvm_timer_init(kvm); + /* Mark the initial VMID generation invalid */ kvm->arch.vmid_gen = 0; |