KVM: PPC: Implement Paired Single emulation
authorAlexander Graf <agraf@suse.de>
Fri, 19 Feb 2010 10:00:44 +0000 (11:00 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Apr 2010 09:35:27 +0000 (12:35 +0300)
commit831317b605e7d7ce0bdadb3b0f50560fc13cecbf
tree3d1cb766faebc56404f3abd43af0b2f461f584fe
parente5c29e926cd29444d76657398801d49119851a56
KVM: PPC: Implement Paired Single emulation

The one big thing about the Gekko is paired singles.

Paired singles are an extension to the instruction set, that adds 32 single
precision floating point registers (qprs), some SPRs to modify the behavior
of paired singled operations and instructions to deal with qprs to the
instruction set.

Unfortunately, it also changes semantics of existing operations that affect
single values in FPRs. In most cases they get mirrored to the coresponding
QPR.

Thanks to that we need to emulate all FPU operations and all the new paired
single operations too.

In order to achieve that, we use the just introduced FPU call helpers to
call the real FPU whenever the guest wants to modify an FPR. Additionally
we also fix up the QPR values along the way.

That way we can execute paired single FPU operations without implementing a
soft fpu.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/include/asm/kvm_book3s.h
arch/powerpc/kvm/Makefile
arch/powerpc/kvm/book3s_64_emulate.c
arch/powerpc/kvm/book3s_paired_singles.c [new file with mode: 0644]