Skip to content

Hypervisor-mode KVM on POWER7

Paul Mackerras kvm kvm-ppc linuxppc-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest12 patches 6 repliesIn review
  2. v113 patches 41 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12kvm/powerpc: Move fields between struct kvm_vcpu_arch and kvmppc_vcpu_book3sarch/powerpc/include/asm/kvm_book3s.h arch/powerpc/include/asm/kvm_host.h arch/powerpc/kvm/book3s.c +3 more+107 -980 replies
2/12kvm/powerpc: Split out code from book3s.c into book3s_pr.carch/powerpc/include/asm/kvm_book3s.h arch/powerpc/kvm/Makefile arch/powerpc/kvm/book3s.c +1 more+1053 -9880 replies
3/12powerpc, kvm: Rework KVM checks in first-level interrupt handlersarch/powerpc/include/asm/exception-64s.h arch/powerpc/kernel/exceptions-64s.S arch/powerpc/kvm/book3s_rmhandlers.S +3 more+247 -1540 replies
4/12kvm/powerpc: Deliver program interrupts right away instead of queueing themarch/powerpc/kvm/book3s.c+3 -50 replies
5/12kvm/powerpc: Pass init/destroy vm and prepare/commit memory region ops downarch/powerpc/include/asm/kvm_ppc.h arch/powerpc/kvm/book3s_pr.c arch/powerpc/kvm/booke.c +1 more+53 -30 replies
6/12kvm/powerpc: Move guest enter/exit down into subarch-specific codearch/powerpc/include/asm/kvm_ppc.h arch/powerpc/kvm/book3s_interrupts.S arch/powerpc/kvm/book3s_pr.c +2 more+22 -120 replies
7/12powerpc: Set up LPCR for running guest partitionsarch/powerpc/include/asm/reg.h arch/powerpc/kernel/cpu_setup_power7.S+15 -70 replies
8/12kvm/powerpc: Split host-state fields out of kvmppc_book3s_shadow_vcpuarch/powerpc/include/asm/exception-64s.h arch/powerpc/include/asm/kvm_book3s_asm.h arch/powerpc/include/asm/paca.h +4 more+124 -1150 replies
9/12kvm/powerpc: Add support for Book3S processors in hypervisor modeDocumentation/virtual/kvm/api.txt arch/powerpc/include/asm/exception-64s.h arch/powerpc/include/asm/kvm_asm.h +21 more+2125 -820 replies
10/12kvm/powerpc: Handle some PAPR hcalls in the kernelarch/powerpc/include/asm/hvcall.h arch/powerpc/include/asm/kvm_host.h arch/powerpc/include/asm/kvm_ppc.h +5 more+685 -40 replies
11/12kvm/powerpc: Accelerate H_PUT_TCE by implementing it in real modeDocumentation/virtual/kvm/api.txt arch/powerpc/include/asm/kvm.h arch/powerpc/include/asm/kvm_book3s_64.h +8 more+269 -30 replies
12/12kvm/powerpc: Allow book3s_hv guests to use SMT processor modesDocumentation/virtual/kvm/api.txt arch/powerpc/include/asm/kvm.h arch/powerpc/include/asm/kvm_book3s_asm.h +11 more+529 -300 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/12] Hypervisor-mode KVM on POWER7

The following series of patches enable KVM to exploit the hardware hypervisor mode on 64-bit Power ISA Book3S machines. At present only POWER7 is supported, but it would be easy to add other processors.

Running the KVM host in hypervisor mode means that the guest can use both supervisor mode and user mode. That means that the guest can execute supervisor-privilege instructions and access supervisor- privilege registers. In addition the hardware directs most exceptions to the guest. Thus we don't need to emulate any instructions in the host. Generally, the only times we need to exit the guest are when it does a hypercall or when an external interrupt or host timer (decrementer) interrupt occurs.

The focus of this KVM implementation is to run guests that use the PAPR (Power Architecture Platform Requirements) paravirtualization interface, which is the interface supplied by PowerVM on IBM pSeries machines. Currently the "pseries" machine type in qemu is only supported by book3s_hv KVM, and book3s_hv KVM only supports the "pseries" machine type. That will hopefully change in future.

These patches are against Linus' v3.0-rc1 tree.

Paul.