KVM: PPC: Use load_fp/vr_state rather than load_up_fpu/altivec
authorPaul Mackerras <paulus@samba.org>
Tue, 15 Oct 2013 09:43:01 +0000 (20:43 +1100)
committerAlexander Graf <agraf@suse.de>
Thu, 9 Jan 2014 09:14:59 +0000 (10:14 +0100)
commit09548fdaf32ce77a68e7f9a8a3098c1306b04858
tree4f57c5c932068c4aae1ff0aba76dbde7614a73b3
parentb1f0d94c26b64e814243b736f47e7ef40d96432c
KVM: PPC: Use load_fp/vr_state rather than load_up_fpu/altivec

The load_up_fpu and load_up_altivec functions were never intended to
be called from C, and do things like modifying the MSR value in their
callers' stack frames, which are assumed to be interrupt frames.  In
addition, on 32-bit Book S they require the MMU to be off.

This makes KVM use the new load_fp_state() and load_vr_state() functions
instead of load_up_fpu/altivec.  This means we can remove the assembler
glue in book3s_rmhandlers.S, and potentially fixes a bug on Book E,
where load_up_fpu was called directly from C.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/kvm_book3s.h
arch/powerpc/include/asm/switch_to.h
arch/powerpc/kvm/book3s_exports.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/book3s_rmhandlers.S
arch/powerpc/kvm/booke.h