[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f3ad05f6c31a18c83d46d234a32769f151c46593.1430387326.git.jslaby@suse.cz>
Date: Thu, 30 Apr 2015 14:11:38 +0200
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Christoffer Dall <christoffer.dall@...aro.org>,
Andre Przywara <andre.przywara@...aro.org>,
Shannon Zhao <shannon.zhao@...aro.org>,
Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 09/63] arm/arm64: KVM: arch_timer: Initialize cntvoff at kvm_init
From: Christoffer Dall <christoffer.dall@...aro.org>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
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@...aro.org>
Acked-by: Marc Zynger <marc.zyngier@....com>
Signed-off-by: Christoffer Dall <christoffer.dall@...aro.org>
Signed-off-by: Shannon Zhao <shannon.zhao@...aro.org>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
arch/arm/kvm/arm.c | 2 ++
virt/kvm/arm/vgic.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
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;
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index b001dbff0f38..14d7b51bb223 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1410,7 +1410,6 @@ int kvm_vgic_init(struct kvm *kvm)
for (i = VGIC_NR_PRIVATE_IRQS; i < VGIC_NR_IRQS; i += 4)
vgic_set_target_reg(kvm, 0, i);
- kvm_timer_init(kvm);
kvm->arch.vgic.ready = true;
out:
mutex_unlock(&kvm->lock);
--
2.3.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists