diff options
Diffstat (limited to 'arch/powerpc/kvm/booke.h')
-rw-r--r-- | arch/powerpc/kvm/booke.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/booke.h b/arch/powerpc/kvm/booke.h index 09bfd9bc7cf8..b632cd35919b 100644 --- a/arch/powerpc/kvm/booke.h +++ b/arch/powerpc/kvm/booke.h | |||
@@ -136,7 +136,9 @@ static inline void kvmppc_load_guest_fp(struct kvm_vcpu *vcpu) | |||
136 | { | 136 | { |
137 | #ifdef CONFIG_PPC_FPU | 137 | #ifdef CONFIG_PPC_FPU |
138 | if (vcpu->fpu_active && !(current->thread.regs->msr & MSR_FP)) { | 138 | if (vcpu->fpu_active && !(current->thread.regs->msr & MSR_FP)) { |
139 | load_up_fpu(); | 139 | enable_kernel_fp(); |
140 | load_fp_state(&vcpu->arch.fp); | ||
141 | current->thread.fp_save_area = &vcpu->arch.fp; | ||
140 | current->thread.regs->msr |= MSR_FP; | 142 | current->thread.regs->msr |= MSR_FP; |
141 | } | 143 | } |
142 | #endif | 144 | #endif |
@@ -151,6 +153,7 @@ static inline void kvmppc_save_guest_fp(struct kvm_vcpu *vcpu) | |||
151 | #ifdef CONFIG_PPC_FPU | 153 | #ifdef CONFIG_PPC_FPU |
152 | if (vcpu->fpu_active && (current->thread.regs->msr & MSR_FP)) | 154 | if (vcpu->fpu_active && (current->thread.regs->msr & MSR_FP)) |
153 | giveup_fpu(current); | 155 | giveup_fpu(current); |
156 | current->thread.fp_save_area = NULL; | ||
154 | #endif | 157 | #endif |
155 | } | 158 | } |
156 | 159 | ||