diff options
author | Alexander Graf <agraf@suse.de> | 2010-03-24 21:48:22 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 12:16:57 +0300 |
commit | c2453693d41f31dae1b4d39b2d59d9a9c6dcb837 (patch) | |
tree | db1342e9e9517990e57b38548037540292c2d364 /arch/powerpc/kvm | |
parent | 8963221d7d7244cc828dfca5649404c747599b3e (diff) | |
download | blackbird-op-linux-c2453693d41f31dae1b4d39b2d59d9a9c6dcb837.tar.gz blackbird-op-linux-c2453693d41f31dae1b4d39b2d59d9a9c6dcb837.zip |
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>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 358d5f78311a..6f409c98205c 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c @@ -702,6 +702,11 @@ static int kvmppc_handle_ext(struct kvm_vcpu *vcpu, unsigned int exit_nr, return RESUME_GUEST; } + /* We already own the ext */ + if (vcpu->arch.guest_owned_ext & msr) { + return RESUME_GUEST; + } + #ifdef DEBUG_EXT printk(KERN_INFO "Loading up ext 0x%lx\n", msr); #endif |