Skip to content

RFC Eliminate double-copying of FP/VMX/VSX state

Paul Mackerras kvm kvm-ppc 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5powerpc: Put FP/VSX and VR state into structuresarch/powerpc/include/asm/ppc_asm.h arch/powerpc/include/asm/processor.h arch/powerpc/include/asm/sfp-machine.h +14 more+201 -3720 replies
2/5powerpc: Provide for giveup_fpu/altivec to save state in alternate locationarch/powerpc/include/asm/processor.h arch/powerpc/kernel/asm-offsets.c arch/powerpc/kernel/fpu.S +3 more+48 -30 replies
3/5KVM: PPC: Use load_fp/vr_state rather than load_up_fpu/altivecarch/powerpc/include/asm/kvm_book3s.h arch/powerpc/include/asm/switch_to.h arch/powerpc/kvm/book3s_exports.c +3 more+14 -630 replies
4/5KVM: PPC: Store FP/VSX/VMX state in thread_fp/vr_state structuresarch/powerpc/include/asm/kvm_host.h arch/powerpc/kernel/asm-offsets.c arch/powerpc/kvm/book3s.c +6 more+131 -2200 replies
5/5KVM: PPC: Book3S: Load/save FP/VMX/VSX state directly to/from vcpu structarch/powerpc/kvm/book3s_pr.c arch/powerpc/kvm/booke.c arch/powerpc/kvm/booke.h+19 -730 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH RFC 0/5] Eliminate double-copying of FP/VMX/VSX state

At present, PR KVM and BookE KVM does multiple copies of FP and related state because of the way that they use the arrays in the thread_struct as an intermediate staging post for the state. They do this so that they can use the existing system functions for loading and saving state, and so that they can keep guest state in the CPU registers while executing general kernel code.

This patch series reorganizes things so that KVM and the main kernel use the same representation for FP/VMX/VSX state, and so that guest state can be loaded/save directly from/to the vcpu struct instead of having to go via the thread_struct. This simplifies things and should be a little faster.

This series is against Alex Graf's kvm-ppc-queue branch plus my recent series of 23 patches to make PR and HV KVM coexist.

Paul.