linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/6] Fix vgic initialization problems
Date: Sat, 13 Dec 2014 12:17:23 +0100	[thread overview]
Message-ID: <1418469449-13277-1-git-send-email-christoffer.dall@linaro.org> (raw)

This series fixes problems with initializing the VGIC.

The problem is that we were initializing the state of the VGIC on-demand
partially, and doing some final initializtion at the time when we were
going to run a VCPU for the first time.

This broke migration, because the first-vcpu-run init would overwrite
restored state.

We also cleanup the naming of the init functions and add checks when
creating VCPUs and when injecting IRQs from userspace.

This series invalidates patch 3 "KVM: arm/arm64: check vgic_initialized
before VCPU creation" in Eric Auger's vgic init ioctl series.

Eric's series should be applied after this one, making future ABIs
(IRQFD, VFIO, GICv3, ...) require explicit userspace vgic initialization
instead of this on-demand approach that we now have to maintain for
legacy userspace compatiblity.

I've tested this with 32-bit and 64-bit QEMU and kvmtool.

Changes since v1:
 - Use vgic_initialized in vgic_init instead of open-coded check
 - Check return value from vgic_init in kvm_vgic_inject_irq
 - Added Patch 6

Christoffer Dall (5):
  arm/arm64: KVM: Rename vgic_initialized to vgic_ready
  arm/arm64: KVM: Add (new) vgic_initialized macro
  arm/arm64: KVM: Don't allow creating VCPUs after vgic_initialized
  arm/arm64: KVM: Initialize the vgic on-demand when injecting IRQs
  arm/arm64: KVM: Require in-kernel vgic for the arch timers

Peter Maydell (1):
  arm/arm64: KVM: vgic: move reset initialization into vgic_init_maps()

 arch/arm/kvm/arm.c           |  24 +++++++---
 include/kvm/arm_arch_timer.h |   2 +-
 include/kvm/arm_vgic.h       |  12 +++--
 virt/kvm/arm/arch_timer.c    |  15 ++++---
 virt/kvm/arm/vgic.c          | 101 +++++++++++++++++++++----------------------
 5 files changed, 88 insertions(+), 66 deletions(-)

-- 
2.1.2.330.g565301e.dirty

             reply	other threads:[~2014-12-13 11:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-13 11:17 Christoffer Dall [this message]
2014-12-13 11:17 ` [PATCH v2 1/6] arm/arm64: KVM: vgic: move reset initialization into vgic_init_maps() Christoffer Dall
2014-12-13 11:17 ` [PATCH v2 2/6] arm/arm64: KVM: Rename vgic_initialized to vgic_ready Christoffer Dall
2014-12-13 11:17 ` [PATCH v2 3/6] arm/arm64: KVM: Add (new) vgic_initialized macro Christoffer Dall
2014-12-13 11:17 ` [PATCH v2 4/6] arm/arm64: KVM: Don't allow creating VCPUs after vgic_initialized Christoffer Dall
2014-12-13 11:17 ` [PATCH v2 5/6] arm/arm64: KVM: Initialize the vgic on-demand when injecting IRQs Christoffer Dall
2014-12-14 11:35   ` Marc Zyngier
2014-12-13 11:17 ` [PATCH v2 6/6] arm/arm64: KVM: Require in-kernel vgic for the arch timers Christoffer Dall
2014-12-14 11:33   ` Marc Zyngier
2014-12-14 14:14     ` Christoffer Dall
2014-12-15  8:57       ` Marc Zyngier
2014-12-15 10:20 ` [PATCH v3 " Christoffer Dall
2014-12-15 10:39   ` Marc Zyngier
2014-12-15 10:50     ` Christoffer Dall

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=1418469449-13277-1-git-send-email-christoffer.dall@linaro.org \
    --to=christoffer.dall@linaro.org \
    --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).