summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-04-03 12:02:02 +0200
committerIngo Molnar <mingo@kernel.org>2015-05-19 15:47:10 +0200
commit97185c95f7ab7f752473c34672dab0925758094b (patch)
tree287e1d57d678656ada4da43572d1defef7d3ae7e /arch/x86/kvm
parent68ad8b9feae583cc5102ec86ad410fce542a5311 (diff)
downloadop-kernel-dev-97185c95f7ab7f752473c34672dab0925758094b.zip
op-kernel-dev-97185c95f7ab7f752473c34672dab0925758094b.tar.gz
x86/fpu: Split an fpstate_alloc_init() function out of init_fpu()
Most init_fpu() users don't want the register-saving aspect of the function, they are calling it for 'current' and when FPU registers are not allocated and initialized yet. Split out a simplified API that does just that (and add debug-checks for these conditions): fpstate_alloc_init(). Use it where appropriate. Reviewed-by: Borislav Petkov <bp@alien8.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index c73efcd..bfc3966 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6600,7 +6600,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
int r;
sigset_t sigsaved;
- if (!tsk_used_math(current) && init_fpu(current))
+ if (!tsk_used_math(current) && fpstate_alloc_init(current))
return -ENOMEM;
if (vcpu->sigset_active)
OpenPOWER on IntegriCloud