Skip to content

KVM: PPC: Virtualize Gekko guests v2

Alexander Graf kvm kvm-ppc 1 version Applied

Status from this message: Applied all, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 of 21 patches 1 replyApplied

v1 -> v2 from the cover letter

- rename REG_ constants to KVM_REG_
- make mmio sign extension more readable
- replace binary patching emulator with function calls
- add capability bit
- make fpscr 64 bit wide
- add secondary htab patch
- make fpu work on ps3 again

13 of 21 patches are in this archive. The cover letter announces 21.

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/21KVM: PPC: Add QPR registersarch/powerpc/include/asm/kvm_host.h+5 -00 replies
2/21KVM: PPC: Make fpscr 64-bitarch/powerpc/include/asm/kvm_host.h+1 -10 replies
3/21KVM: PPC: Enable MMIO to do 64 bits, fprs and qprsarch/powerpc/include/asm/kvm.h arch/powerpc/include/asm/kvm_ppc.h arch/powerpc/kvm/powerpc.c+30 -30 replies
5/21KVM: PPC: Add AGAIN type for emulation returnarch/powerpc/include/asm/kvm_ppc.h arch/powerpc/kvm/book3s.c arch/powerpc/kvm/emulate.c+7 -10 replies
6/21KVM: PPC: Add hidden flag for paired singlesarch/powerpc/include/asm/kvm_asm.h arch/powerpc/kvm/book3s.c+5 -00 replies
7/21KVM: PPC: Add Gekko SPRsarch/powerpc/include/asm/kvm_book3s.h arch/powerpc/include/asm/reg.h arch/powerpc/kvm/book3s_64_emulate.c+81 -00 replies
10/21KVM: PPC: Fix typo in book3s_32 debug codearch/powerpc/kvm/book3s_32_mmu.c+1 -10 replies
13/21KVM: PPC: Make ext giveup non-staticarch/powerpc/include/asm/kvm_book3s.h arch/powerpc/kvm/book3s.c+2 -20 replies
14/21KVM: PPC: Add helpers to call FPU instructionsarch/powerpc/include/asm/kvm_fpu.h arch/powerpc/kernel/ppc_ksyms.c arch/powerpc/kvm/Makefile +1 more+362 -00 replies
16/21KVM: PPC: Add helpers to modify ppc fieldsarch/powerpc/include/asm/kvm_ppc.h+33 -00 replies
17/21KVM: PPC: Enable program interrupt to do MMIOarch/powerpc/kvm/book3s.c+4 -00 replies
18/21KVM: PPC: Implement Paired Single emulationarch/powerpc/include/asm/kvm_book3s.h arch/powerpc/kvm/Makefile arch/powerpc/kvm/book3s_64_emulate.c +1 more+1294 -00 replies
20/21KVM: PPC: Enable use of secondary htab bucketarch/powerpc/kvm/book3s_64_mmu_host.c+1 -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 00/21] KVM: PPC: Virtualize Gekko guests v2

In an effort to get KVM on PPC more useful for other userspace users than Qemu, I figured it'd be a nice idea to implement virtualization of the Gekko CPU.

The Gekko is the CPU used in the GameCube. In a slightly more modern fashion it lives on in the Wii today.

Using this patch set and a modified version of Dolphin, I was able to virtualize simple GameCube demos on a 970MP system.

As always, while getting this to run I stumbled across several broken parts and fixed them as they came up. So expect some bug fixes in this patch set too.

v1 -> v2:

- rename REG_ constants to KVM_REG_
- make mmio sign extension more readable
- replace binary patching emulator with function calls
- add capability bit
- make fpscr 64 bit wide
- add secondary htab patch
- make fpu work on ps3 again

Alexander Graf (21):
KVM: PPC: Add QPR registers
KVM: PPC: Make fpscr 64-bit
KVM: PPC: Enable MMIO to do 64 bits, fprs and qprs
KVM: PPC: Teach MMIO Signedness
KVM: PPC: Add AGAIN type for emulation return
KVM: PPC: Add hidden flag for paired singles
KVM: PPC: Add Gekko SPRs
KVM: PPC: Combine extension interrupt handlers
KVM: PPC: Preload FPU when possible
KVM: PPC: Fix typo in book3s_32 debug code
KVM: PPC: Implement mtsr instruction emulation
KVM: PPC: Make software load/store return eaddr
KVM: PPC: Make ext giveup non-static
KVM: PPC: Add helpers to call FPU instructions
KVM: PPC: Fix error in BAT assignment
KVM: PPC: Add helpers to modify ppc fields
KVM: PPC: Enable program interrupt to do MMIO
KVM: PPC: Implement Paired Single emulation
KVM: PPC: Add capability for paired singles
KVM: PPC: Enable use of secondary htab bucket
KVM: PPC: Simplify kvmppc_load_up_(FPU|VMX|VSX)

 arch/powerpc/include/asm/kvm.h           |    7 +
 arch/powerpc/include/asm/kvm_asm.h       |    1 +
 arch/powerpc/include/asm/kvm_book3s.h    |    7 +-
 arch/powerpc/include/asm/kvm_fpu.h       |   85 ++
 arch/powerpc/include/asm/kvm_host.h      |    8 +-
 arch/powerpc/include/asm/kvm_ppc.h       |   39 +-
 arch/powerpc/include/asm/reg.h           |   10 +
 arch/powerpc/kernel/ppc_ksyms.c          |    2 +
 arch/powerpc/kvm/Makefile                |    2 +
 arch/powerpc/kvm/book3s.c                |  118 +++-
 arch/powerpc/kvm/book3s_32_mmu.c         |    2 +-
 arch/powerpc/kvm/book3s_64_emulate.c     |   94 ++-
 arch/powerpc/kvm/book3s_64_mmu_host.c    |    9 +-
 arch/powerpc/kvm/book3s_64_rmhandlers.S  |   13 +-
 arch/powerpc/kvm/book3s_paired_singles.c | 1289 ++++++++++++++++++++++++++++++
 arch/powerpc/kvm/emulate.c               |   18 +-
 arch/powerpc/kvm/fpu.S                   |  274 +++++++
 arch/powerpc/kvm/powerpc.c               |   54 ++-
 include/linux/kvm.h                      |    1 +
 19 files changed, 1976 insertions(+), 57 deletions(-)
 create mode 100644 arch/powerpc/include/asm/kvm_fpu.h
 create mode 100644 arch/powerpc/kvm/book3s_paired_singles.c
 create mode 100644 arch/powerpc/kvm/fpu.S