Skip to content

Allow PR and HV KVM to coexist in one kernel

Aneesh Kumar K.V kvm kvm-ppc linuxppc-dev 1 version Applied

Status from this message: Thanks, applied all to kvm-ppc-queue.

Get series with b4
b4 am 1381164482-31001-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com

Versions newest first

  1. v1 Latest14 patches 5 repliesApplied

Changes from V1 from the cover letter

* Build fixes for BOOKE (only compile tested)
* Address review feedback

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/14kvm: powerpc: book3s: remove kvmppc_handler_highmem labelarch/powerpc/kvm/book3s_hv_interrupts.S arch/powerpc/kvm/book3s_interrupts.S+0 -60 replies
2/14kvm: powerpc: book3s: move book3s_64_vio_hv.c into the main kernel binaryarch/powerpc/kvm/Makefile arch/powerpc/kvm/book3s_64_vio_hv.c+9 -40 replies
3/14kvm: powerpc: book3s: pr: Rename KVM_BOOK3S_PR to KVM_BOOK3S_PR_POSSIBLEarch/powerpc/include/asm/exception-64s.h arch/powerpc/include/asm/kvm_book3s.h arch/powerpc/include/asm/kvm_book3s_64.h +6 more+16 -160 replies
4/14kvm: powerpc: book3s: Add a new config variable CONFIG_KVM_BOOK3S_HV_POSSIBLEarch/powerpc/include/asm/kvm_book3s.h arch/powerpc/include/asm/kvm_book3s_64.h arch/powerpc/include/asm/kvm_book3s_asm.h +7 more+43 -240 replies
5/14kvm: powerpc: book3s: Add kvmppc_ops callbackarch/powerpc/include/asm/kvm_book3s.h arch/powerpc/include/asm/kvm_ppc.h arch/powerpc/kernel/exceptions-64s.S +12 more+554 -2240 replies
6/14kvm: powerpc: booke: Convert BOOKE to use kvmppc_ops callbacksarch/powerpc/include/asm/kvm_ppc.h arch/powerpc/kvm/44x.c arch/powerpc/kvm/44x_emulate.c +7 more+194 -632 replies
7/14kvm: powerpc: book3s: Cleanup interrupt handling codearch/powerpc/include/asm/exception-64s.h arch/powerpc/kvm/book3s_hv_rmhandlers.S arch/powerpc/kvm/book3s_segment.S+20 -40 replies
8/14kvm: powerpc: book3s: Add is_hv_enabled to kvmppc_opsarch/powerpc/include/asm/kvm_book3s.h arch/powerpc/include/asm/kvm_ppc.h arch/powerpc/kvm/book3s.c +4 more+79 -810 replies
9/14kvm: powerpc: book3s: pr: move PR related tracepoints to a separate headerarch/powerpc/kvm/book3s_64_mmu_host.c arch/powerpc/kvm/book3s_mmu_hpte.c arch/powerpc/kvm/book3s_pr.c +2 more+309 -2300 replies
10/14kvm: powerpc: booke: Move booke related tracepoints to separate headerarch/powerpc/kvm/booke.c arch/powerpc/kvm/e500_mmu.c arch/powerpc/kvm/e500_mmu_host.c +2 more+183 -2070 replies
11/14kvm: powerpc: book3s: Support building HV and PR KVM as modulearch/powerpc/kvm/Kconfig arch/powerpc/kvm/Makefile arch/powerpc/kvm/book3s.c +7 more+45 -91 reply
12/14kvm: Add struct kvm arg to memslot APIsarch/arm/kvm/arm.c arch/ia64/kvm/kvm-ia64.c arch/mips/kvm/kvm_mips.c +8 more+37 -280 replies
13/14kvm: powerpc: book3s: Allow the HV and PR selection per virtual machinearch/powerpc/include/asm/kvm_host.h arch/powerpc/include/asm/kvm_ppc.h arch/powerpc/kvm/44x.c +11 more+187 -910 replies
14/14kvm: powerpc: book3s: drop is_hv_enabledarch/powerpc/include/asm/kvm_ppc.h arch/powerpc/kvm/book3s.c arch/powerpc/kvm/book3s_hv.c +3 more+10 -80 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH -V2 00/14] Allow PR and HV KVM to coexist in one kernel

Hi All,

This patch series support enabling HV and PR KVM together in the same kernel. We extend machine property with new property "kvm_type". A value of "HV" will force HV KVM and "PR" PR KVM. If we don't specify kvm_type we will select the fastest KVM mode. ie, HV if that is supported otherwise PR.

With Qemu command line having

-machine pseries,accel=kvm,kvm_type=HV

[root@llmp24l02 qemu]# bash ../qemu
failed to initialize KVM: Invalid argument
[root@llmp24l02 qemu]# modprobe kvm-pr
[root@llmp24l02 qemu]# bash ../qemu
failed to initialize KVM: Invalid argument
[root@llmp24l02 qemu]# modprobe kvm-hv
[root@llmp24l02 qemu]# bash ../qemu

now with

-machine pseries,accel=kvm,kvm_type=PR

[root@llmp24l02 qemu]# rmmod kvm-pr
[root@llmp24l02 qemu]# bash ../qemu
failed to initialize KVM: Invalid argument
[root@llmp24l02 qemu]#
[root@llmp24l02 qemu]# modprobe kvm-pr
[root@llmp24l02 qemu]# bash ../qemu

Changes from V1:
* Build fixes for BOOKE (only compile tested)
* Address review feedback

-aneesh