diff options
| -rw-r--r-- | arch/x86/kernel/i387.c | 1 | ||||
| -rw-r--r-- | arch/x86/kvm/x86.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index 58bb239a2fd..e60c38cc0ee 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c | |||
| @@ -169,6 +169,7 @@ int init_fpu(struct task_struct *tsk) | |||
| 169 | set_stopped_child_used_math(tsk); | 169 | set_stopped_child_used_math(tsk); |
| 170 | return 0; | 170 | return 0; |
| 171 | } | 171 | } |
| 172 | EXPORT_SYMBOL_GPL(init_fpu); | ||
| 172 | 173 | ||
| 173 | /* | 174 | /* |
| 174 | * The xstateregs_active() routine is the same as the fpregs_active() routine, | 175 | * The xstateregs_active() routine is the same as the fpregs_active() routine, |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index fa708c9a743..9dda70dffac 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
| @@ -5376,6 +5376,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
| 5376 | int r; | 5376 | int r; |
| 5377 | sigset_t sigsaved; | 5377 | sigset_t sigsaved; |
| 5378 | 5378 | ||
| 5379 | if (!tsk_used_math(current) && init_fpu(current)) | ||
| 5380 | return -ENOMEM; | ||
| 5381 | |||
| 5379 | if (vcpu->sigset_active) | 5382 | if (vcpu->sigset_active) |
| 5380 | sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved); | 5383 | sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved); |
| 5381 | 5384 | ||
