linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: stable@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Christoffer Dall <christoffer.dall@linaro.org>,
	Andre Przywara <andre.przywara@linaro.org>,
	Shannon Zhao <shannon.zhao@linaro.org>,
	Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH 3.12 09/63] arm/arm64: KVM: arch_timer: Initialize cntvoff at kvm_init
Date: Thu, 30 Apr 2015 14:11:38 +0200	[thread overview]
Message-ID: <f3ad05f6c31a18c83d46d234a32769f151c46593.1430387326.git.jslaby@suse.cz> (raw)
In-Reply-To: <45aaf85687dd6ac119c55c5ec0dbe0bef0e62235.1430387326.git.jslaby@suse.cz>
In-Reply-To: <cover.1430387326.git.jslaby@suse.cz>

From: Christoffer Dall <christoffer.dall@linaro.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@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>
---
 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


  parent reply	other threads:[~2015-04-30 12:27 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 12:12 [PATCH 3.12 00/63] 3.12.42-stable review Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 01/63] KVM: ARM: Fix calculation of virtual CPU ID Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 02/63] KVM: ARM: fix the size of TTBCR_{T0SZ,T1SZ} masks Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 03/63] ARM: KVM: Yield CPU when vcpu executes a WFE Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 04/63] ARM: KVM: Fix MPIDR computing to support virtual clusters Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 05/63] KVM: ARM: Update comments for kvm_handle_wfi Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 06/63] ARM: KVM: fix L2CTLR to be per-cluster Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 07/63] arm/arm64: KVM: PSCI: use MPIDR to identify a target CPU Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 08/63] arm64: KVM: Yield CPU when vcpu executes a WFE Jiri Slaby
2015-04-30 12:11 ` Jiri Slaby [this message]
2015-04-30 12:11 ` [PATCH 3.12 10/63] ARM: KVM: Allow creating the VGIC after VCPUs Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 11/63] arm/arm64: kvm: Set vcpu->cpu to -1 on vcpu_put Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 12/63] arm64: KVM: Force undefined exception for Guest SMC intructions Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 13/63] arm: KVM: Don't return PSCI_INVAL if waitqueue is inactive Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 14/63] KVM: ARM: Remove duplicate include Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 15/63] arm: kvm: implement CPU PM notifier Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 16/63] arm/arm64: KVM: detect CPU reset on CPU_PM_EXIT Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 17/63] arm64: KVM: force cache clean on page fault when caches are off Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 18/63] arm64: KVM: allows discrimination of AArch32 sysreg access Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 19/63] arm64: KVM: trap VM system registers until MMU and caches are ON Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 20/63] ARM: KVM: introduce kvm_p*d_addr_end Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 21/63] arm64: KVM: flush VM pages before letting the guest enable caches Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 22/63] ARM: KVM: force cache clean on page fault when caches are off Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 23/63] ARM: KVM: fix handling of trapped 64bit coprocessor accesses Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 24/63] ARM: KVM: fix ordering of " Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 25/63] ARM: KVM: introduce per-vcpu HYP Configuration Register Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 26/63] ARM: KVM: add world-switch for AMAIR{0,1} Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 27/63] ARM: KVM: trap VM system registers until MMU and caches are ON Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 28/63] ARM: KVM: fix non-VGIC compilation Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 29/63] ARM: KVM: disable KVM in Kconfig on big-endian systems Jiri Slaby
2015-04-30 12:11 ` [PATCH 3.12 30/63] KVM: arm/arm64: vgic: fix GICD_ICFGR register accesses Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 31/63] KVM: ARM: vgic: Fix the overlap check action about setting the GICD & GICC base address Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 32/63] arm64: kvm: use inner-shareable barriers for inner-shareable maintenance Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 33/63] kvm: arm64: vgic: fix hyp panic with 64k pages on juno platform Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 34/63] arm/arm64: KVM: Fix and refactor unmap_range Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 35/63] ARM: KVM: Unmap IPA on memslot delete/move Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 36/63] ARM: KVM: user_mem_abort: support stage 2 MMIO page mapping Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 37/63] arm64: KVM: export demux regids as KVM_REG_ARM64 Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 38/63] ARM: virt: fix wrong HSCTLR.EE bit setting Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 39/63] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 40/63] KVM: ARM/arm64: fix non-const declaration of function returning const Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 41/63] KVM: ARM/arm64: fix broken __percpu annotation Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 42/63] KVM: ARM/arm64: avoid returning negative error code as bool Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 43/63] KVM: vgic: return int instead of bool when checking I/O ranges Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 44/63] ARM/ARM64: KVM: Nuke Hyp-mode tlbs before enabling MMU Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 45/63] arm/arm64: KVM: Complete WFI/WFE instructions Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 46/63] ARM/arm64: KVM: fix use of WnR bit in kvm_is_write_fault() Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 47/63] KVM: ARM: vgic: plug irq injection race Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 48/63] arm/arm64: KVM: Fix VTTBR_BADDR_MASK and pgd alloc Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 49/63] arm: kvm: fix CPU hotplug Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 50/63] arm/arm64: KVM: Ensure memslots are within KVM_PHYS_SIZE Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 51/63] arm: kvm: STRICT_MM_TYPECHECKS fix for user_mem_abort Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 52/63] arm64/kvm: Fix assembler compatibility of macros Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 53/63] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn() Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 54/63] arm/arm64: KVM: Don't clear the VCPU_POWER_OFF flag Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 55/63] arm/arm64: KVM: Correct KVM_ARM_VCPU_INIT power off option Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 56/63] arm/arm64: KVM: Reset the HCR on each vcpu when resetting the vcpu Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 57/63] arm/arm64: KVM: Introduce stage2_unmap_vm Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 58/63] arm/arm64: KVM: Don't allow creating VCPUs after vgic_initialized Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 59/63] arm/arm64: KVM: Require in-kernel vgic for the arch timers Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 60/63] arm64: KVM: Fix TLB invalidation by IPA/VMID Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 61/63] arm64: KVM: Fix HCR setting for 32bit guests Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 62/63] arm64: KVM: Do not use pgd_index to index stage-2 pgd Jiri Slaby
2015-04-30 12:12 ` [PATCH 3.12 63/63] arm/arm64: KVM: Keep elrsr/aisr in sync with software model Jiri Slaby
2015-04-30 13:12 ` [PATCH 3.12 00/63] 3.12.42-stable review Guenter Roeck
2015-05-04 13:27   ` Jiri Slaby
2015-04-30 14:26 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f3ad05f6c31a18c83d46d234a32769f151c46593.1430387326.git.jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=andre.przywara@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shannon.zhao@linaro.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).