summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/fpu.S
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2010-05-31 21:59:13 +0200
committerAvi Kivity <avi@redhat.com>2010-08-01 09:39:24 +0200
commit49f6be8ea1bd74713c1a48e42db06a3808dfa2cd (patch)
tree5be35ebab7a049e9358a60b308df981b02f70f21 /arch/powerpc/kvm/fpu.S
parentKVM: VMX: Properly return error to userspace on vmentry failure (diff)
downloadlinux-49f6be8ea1bd74713c1a48e42db06a3808dfa2cd.tar.xz
linux-49f6be8ea1bd74713c1a48e42db06a3808dfa2cd.zip
KVM: PPC: elide struct thread_struct instances from stack
Instead of instantiating a whole thread_struct on the stack use only the required parts of it. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Tested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/fpu.S')
-rw-r--r--arch/powerpc/kvm/fpu.S18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/fpu.S b/arch/powerpc/kvm/fpu.S
index 2b340a3eee90..cb34bbe16113 100644
--- a/arch/powerpc/kvm/fpu.S
+++ b/arch/powerpc/kvm/fpu.S
@@ -271,3 +271,21 @@ FPD_THREE_IN(fmsub)
FPD_THREE_IN(fmadd)
FPD_THREE_IN(fnmsub)
FPD_THREE_IN(fnmadd)
+
+_GLOBAL(kvm_cvt_fd)
+ lfd 0,0(r5) /* load up fpscr value */
+ MTFSF_L(0)
+ lfs 0,0(r3)
+ stfd 0,0(r4)
+ mffs 0
+ stfd 0,0(r5) /* save new fpscr value */
+ blr
+
+_GLOBAL(kvm_cvt_df)
+ lfd 0,0(r5) /* load up fpscr value */
+ MTFSF_L(0)
+ lfd 0,0(r3)
+ stfs 0,0(r4)
+ mffs 0
+ stfd 0,0(r5) /* save new fpscr value */
+ blr