linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/15] arm/arm64: KVM: arch_timer: Initialize cntvoff at kvm_init
Date: Sat, 28 Dec 2013 11:15:33 +0000	[thread overview]
Message-ID: <1388229347-24185-2-git-send-email-marc.zyngier@arm.com> (raw)
In-Reply-To: <1388229347-24185-1-git-send-email-marc.zyngier@arm.com>

From: Christoffer Dall <christoffer.dall@linaro.org>

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>
---
 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 2a700e0..13205bd 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 685fc72..81e9481 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1409,7 +1409,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);
-- 
1.8.5.1

  reply	other threads:[~2013-12-28 11:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-28 11:15 [PULL 00/15] KVM/{arm,arm64} updates for 3.14 Marc Zyngier
2013-12-28 11:15 ` Marc Zyngier [this message]
2013-12-28 11:15 ` [PATCH 02/15] ARM/KVM: save and restore generic timer registers Marc Zyngier
2013-12-28 11:15 ` [PATCH 03/15] ARM: KVM: Allow creating the VGIC after VCPUs Marc Zyngier
2013-12-28 11:15 ` [PATCH 04/15] KVM: arm-vgic: Support KVM_CREATE_DEVICE for VGIC Marc Zyngier
2013-12-28 11:15 ` [PATCH 05/15] KVM: arm-vgic: Set base addr through device API Marc Zyngier
2013-12-28 11:15 ` [PATCH 06/15] irqchip: arm-gic: Define additional MMIO offsets and masks Marc Zyngier
2013-12-28 11:15 ` [PATCH 07/15] KVM: arm-vgic: Make vgic mmio functions more generic Marc Zyngier
2013-12-28 11:15 ` [PATCH 08/15] arm/arm64: kvm: Set vcpu->cpu to -1 on vcpu_put Marc Zyngier
2013-12-28 11:15 ` [PATCH 09/15] KVM: arm-vgic: Add vgic reg access from dev attr Marc Zyngier
2013-12-28 11:15 ` [PATCH 10/15] KVM: arm-vgic: Support unqueueing of LRs to the dist Marc Zyngier
2013-12-28 11:15 ` [PATCH 11/15] KVM: arm-vgic: Add GICD_SPENDSGIR and GICD_CPENDSGIR handlers Marc Zyngier
2013-12-28 11:15 ` [PATCH 12/15] KVM: arm-vgic: Support CPU interface reg access Marc Zyngier
2013-12-28 11:15 ` [PATCH 13/15] arm64: KVM: Add Kconfig option for max VCPUs per-Guest Marc Zyngier
2013-12-28 11:15 ` [PATCH 14/15] arm64: KVM: Support X-Gene guest VCPU on APM X-Gene host Marc Zyngier
2013-12-28 11:15 ` [PATCH 15/15] arm64: KVM: Force undefined exception for Guest SMC intructions Marc Zyngier
2013-12-31 19:25 ` [PULL 00/15] KVM/{arm,arm64} updates for 3.14 Marcelo Tosatti

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=1388229347-24185-2-git-send-email-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).