linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] arm64: Virtualization Host Extension support
@ 2015-07-08 16:19 Marc Zyngier
  2015-07-08 16:19 ` [PATCH 01/13] arm/arm64: Add new is_kernel_in_hyp_mode predicate Marc Zyngier
                   ` (14 more replies)
  0 siblings, 15 replies; 42+ messages in thread
From: Marc Zyngier @ 2015-07-08 16:19 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Christoffer Dall
  Cc: linux-arm-kernel, linux-kernel, kvm, kvmarm

ARMv8.1 comes with the "Virtualization Host Extension" (VHE for
short), which enables simpler support of Type-2 hypervisors.

This extension allows the kernel to directly run at EL2, and
significantly reduces the number of system registers shared between
host and guest, reducing the overhead of virtualization.

In order to have the same kernel binary running on all versions of the
architecture, this series makes heavy use of runtime code patching.

The first ten patches massage the KVM code to deal with VHE and enable
Linux to run at EL2.

The next patch catches an ugly case when VHE capable CPUs are paired
with some of their less capable siblings. This should never happen,
but hey...

The last two patches add an optimisation allowing a physical interrupt
to be serviced on the host without doing a full save/restore, leading
to potential reduction in interrupt latency.

This has been tested on the FVP_Base_SLV-V8-A model, and based on
v4.2-rc1. I've put a branch out on:

git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/vhe

Marc Zyngier (13):
  arm/arm64: Add new is_kernel_in_hyp_mode predicate
  arm64: Allow the arch timer to use the HYP timer
  arm64: Add ARM64_HAS_VIRT_HOST_EXTN feature
  arm64: KVM: skip HYP setup when already running in HYP
  arm64: KVM: VHE: macroize VTCR_EL2 setup
  arm64: KVM: VHE: Patch out kern_hyp_va
  arm64: KVM: VHE: Patch out use of HVC
  arm64: KVM: VHE: Preserve VHE config in world switch
  arm64: KVM: VHE: Add alternatives for VHE-enabled world-switch
  arm64: Add support for running Linux in EL2 mode
  arm64: Panic when VHE and non VHE CPUs coexist
  arm64: KVM: Split sysreg save/restore
  arm64: KVM: VHE: Early interrupt handling

 arch/arm/include/asm/virt.h          |   5 +
 arch/arm/kvm/arm.c                   | 134 ++++++++-----
 arch/arm/kvm/mmu.c                   |   6 +
 arch/arm64/include/asm/cpufeature.h  |   3 +-
 arch/arm64/include/asm/kvm_arm.h     |   1 +
 arch/arm64/include/asm/kvm_asm.h     |  40 +++-
 arch/arm64/include/asm/kvm_emulate.h |   2 +
 arch/arm64/include/asm/kvm_mmu.h     |  24 ++-
 arch/arm64/include/asm/virt.h        |  25 +++
 arch/arm64/kernel/cpufeature.c       |  11 ++
 arch/arm64/kernel/head.S             |  38 +++-
 arch/arm64/kernel/smp.c              |   4 +
 arch/arm64/kvm/hyp-init.S            |   9 +-
 arch/arm64/kvm/hyp.S                 | 363 ++++++++++++++++++++++++-----------
 arch/arm64/kvm/vgic-v2-switch.S      |  19 +-
 arch/arm64/kvm/vgic-v3-switch.S      |  33 ++--
 arch/arm64/kvm/vhe-macros.h          |  54 ++++++
 drivers/clocksource/arm_arch_timer.c |  96 +++++----
 18 files changed, 638 insertions(+), 229 deletions(-)
 create mode 100644 arch/arm64/kvm/vhe-macros.h

-- 
2.1.4


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2015-08-31 18:51 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08 16:19 [PATCH 00/13] arm64: Virtualization Host Extension support Marc Zyngier
2015-07-08 16:19 ` [PATCH 01/13] arm/arm64: Add new is_kernel_in_hyp_mode predicate Marc Zyngier
2015-07-09  9:42   ` Mark Rutland
2015-07-09 10:05     ` Marc Zyngier
2015-07-09 10:12       ` Mark Rutland
2015-07-16 18:08   ` Will Deacon
2015-07-08 16:19 ` [PATCH 02/13] arm64: Allow the arch timer to use the HYP timer Marc Zyngier
2015-07-08 16:19 ` [PATCH 03/13] arm64: Add ARM64_HAS_VIRT_HOST_EXTN feature Marc Zyngier
2015-07-09  9:48   ` Mark Rutland
2015-07-09  9:59     ` Marc Zyngier
2015-07-16 18:04   ` Will Deacon
2015-07-08 16:19 ` [PATCH 04/13] arm64: KVM: skip HYP setup when already running in HYP Marc Zyngier
2015-07-08 16:19 ` [PATCH 05/13] arm64: KVM: VHE: macroize VTCR_EL2 setup Marc Zyngier
2015-07-08 16:19 ` [PATCH 06/13] arm64: KVM: VHE: Patch out kern_hyp_va Marc Zyngier
2015-07-08 16:19 ` [PATCH 07/13] arm64: KVM: VHE: Patch out use of HVC Marc Zyngier
2015-07-08 17:14   ` Paolo Bonzini
2015-07-08 17:54     ` Marc Zyngier
2015-07-10 11:02       ` Paolo Bonzini
2015-08-05 17:57   ` Catalin Marinas
2015-07-08 16:19 ` [PATCH 08/13] arm64: KVM: VHE: Preserve VHE config in world switch Marc Zyngier
2015-07-08 16:19 ` [PATCH 09/13] arm64: KVM: VHE: Add alternatives for VHE-enabled world-switch Marc Zyngier
2015-07-09  1:29   ` Mario Smarduch
2015-07-09  8:06     ` Marc Zyngier
2015-07-09 20:58       ` Mario Smarduch
2015-08-31 18:46   ` Christoffer Dall
2015-07-08 16:19 ` [PATCH 10/13] arm64: Add support for running Linux in EL2 mode Marc Zyngier
2015-07-16 17:48   ` Will Deacon
2015-07-08 16:19 ` [PATCH 11/13] arm64: Panic when VHE and non VHE CPUs coexist Marc Zyngier
2015-07-16 18:03   ` Will Deacon
2015-08-06 14:08   ` Catalin Marinas
2015-07-08 16:19 ` [PATCH 12/13] arm64: KVM: Split sysreg save/restore Marc Zyngier
2015-08-31 18:49   ` Christoffer Dall
2015-07-08 16:19 ` [PATCH 13/13] arm64: KVM: VHE: Early interrupt handling Marc Zyngier
2015-08-31 18:52   ` Christoffer Dall
2015-08-06 17:43 ` [PATCH 00/13] arm64: Virtualization Host Extension support Catalin Marinas
2015-08-26  9:12 ` Antonios Motakis
2015-08-26  9:21   ` Jan Kiszka
2015-08-26  9:28     ` Antonios Motakis
2015-08-26  9:54       ` Jan Kiszka
2015-08-26  9:59     ` Marc Zyngier
2015-08-26 11:16       ` Antonios Motakis
2015-08-28  7:04         ` Marc Zyngier

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).