public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: kvmarm@lists.cs.columbia.edu
Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org
Subject: [PATCH v3 0/2] KVM: ARM: Enable vtimers with user space gic
Date: Fri, 16 Sep 2016 08:26:25 +0200	[thread overview]
Message-ID: <1474007187-18673-1-git-send-email-agraf@suse.de> (raw)

Some systems out there (well, one type in particular - the Raspberry Pi series)
do have virtualization capabilities in the core, but no ARM GIC interrupt
controller.

To run on these systems, the cleanest route is to just handle all
interrupt delivery in user space and only deal with IRQ pins in the core
side in KVM.

This works pretty well already, but breaks when the guest starts to use
architected timers, as these are handled straight inside kernel space today.

This patch set allows user space to receive vtimer events as well as mask
them, so that we can handle all vtimer related interrupt injection from user
space, enabling us to use architected timer with user space gic emulation.

I have successfully run edk2 as well as Linux using these patches on a
Raspberry Pi 3 system with acceptable speed.

A branch with WIP QEMU code can be found here:

  https://github.com/agraf/qemu.git no-kvm-irqchip

To use the user space irqchip, just run it with

  $ qemu-system-aarch64 -M virt,kernel-irqchip=off

v1 -> v2:

  - Add back curly brace that got lost

v2 -> v3:

  - Fix "only only" in documentation
  - Split patches
  - Remove kvm_emulate.h include

Alexander Graf (2):
  KVM: arm/arm64: Add vcpu ENABLE_CAP functionality
  KVM: arm/arm64: Route vtimer events to user space

 Documentation/virtual/kvm/api.txt |  28 ++++++++-
 arch/arm/include/asm/kvm_host.h   |   3 +
 arch/arm/kvm/arm.c                |  47 +++++++++++---
 arch/arm64/include/asm/kvm_host.h |   3 +
 include/uapi/linux/kvm.h          |  14 +++++
 virt/kvm/arm/arch_timer.c         | 125 +++++++++++++++++++++++++++-----------
 6 files changed, 177 insertions(+), 43 deletions(-)

-- 
2.6.6


             reply	other threads:[~2016-09-16  6:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16  6:26 Alexander Graf [this message]
2016-09-16  6:26 ` [PATCH v3 1/2] KVM: arm/arm64: Add vcpu ENABLE_CAP functionality Alexander Graf
2016-09-16  6:26 ` [PATCH v3 2/2] KVM: arm/arm64: Route vtimer events to user space Alexander Graf
2016-09-16  9:11   ` Peter Maydell
2016-09-16  9:18     ` Alexander Graf
2016-09-16 10:20 ` [PATCH v3 0/2] KVM: ARM: Enable vtimers with user space gic Marc Zyngier
2016-09-16 12:18   ` Paolo Bonzini
2016-09-16 12:30     ` Christoffer Dall
2016-09-16 12:31       ` Paolo Bonzini
2016-09-16 13:30         ` Christoffer Dall
2016-09-16 13:46           ` Andrew Jones
2016-09-16 15:45             ` Paolo Bonzini
2016-09-16 19:36             ` Alexander Graf
2016-09-19  7:52               ` Andrew Jones
2016-09-19 11:45                 ` Alexander Graf
2016-09-16 13:50           ` Gerd Hoffmann
2016-09-19 10:51           ` Alexander Graf
2016-09-19 11:41             ` Christoffer Dall
2016-09-16 12:25   ` Alexander Graf
2016-09-16 12:29     ` Christoffer Dall
2016-09-16 12:40       ` Paolo Bonzini
2016-09-16 12:44         ` Alexander Graf
2016-09-16 12:54           ` Paolo Bonzini
2016-09-17 15:28           ` Ard Biesheuvel
2016-09-17 15:38             ` Peter Maydell
2016-09-17 16:47               ` Ard Biesheuvel
2016-09-16 12:43       ` Alexander Graf

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=1474007187-18673-1-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --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