KVM: PPC: Load/save FP/VMX/VSX state directly to/from vcpu struct
authorPaul Mackerras <paulus@samba.org>
Tue, 15 Oct 2013 09:43:03 +0000 (20:43 +1100)
committerAlexander Graf <agraf@suse.de>
Thu, 9 Jan 2014 09:15:02 +0000 (10:15 +0100)
commit99dae3bad28d8fdd32b7bfdd5e2ec7bb2d4d019d
tree524617ede36278f57f7a06be1f6ea88987f520c0
parentefff19122315f1431f6b02cd2983b15f5d3957bd
KVM: PPC: Load/save FP/VMX/VSX state directly to/from vcpu struct

Now that we have the vcpu floating-point and vector state stored in
the same type of struct as the main kernel uses, we can load that
state directly from the vcpu struct instead of having extra copies
to/from the thread_struct.  Similarly, when the guest state needs to
be saved, we can have it saved it directly to the vcpu struct by
setting the current->thread.fp_save_area and current->thread.vr_save_area
pointers.  That also means that we don't need to back up and restore
userspace's FP/vector state.  This all makes the code simpler and
faster.

Note that it's not necessary to save or modify current->thread.fpexc_mode,
since nothing in KVM uses or is affected by its value.  Nor is it
necessary to touch used_vr or used_vsr.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/booke.h