KVM: PPC: Don't reload FPU with invalid values
authorAlexander Graf <agraf@suse.de>
Wed, 24 Mar 2010 20:48:22 +0000 (21:48 +0100)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:16:57 +0000 (12:16 +0300)
commitc2453693d41f31dae1b4d39b2d59d9a9c6dcb837
treedb1342e9e9517990e57b38548037540292c2d364
parent8963221d7d7244cc828dfca5649404c747599b3e
KVM: PPC: Don't reload FPU with invalid values

When the guest activates the FPU, we load it up. That's fine when
it wasn't activated before on the host, but if it was we end up
reloading FPU values from last time the FPU was deactivated on the
host without writing the proper values back to the vcpu struct.

This patch checks if the FPU is enabled already and if so just doesn't
bother activating it, making FPU operations survive guest context switches.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/kvm/book3s.c