From: Kyle Hale Date: Mon, 29 Dec 2014 19:54:15 +0000 (-0600) Subject: FPU stub change to support more recent kernels X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=b42be88af0bc84e967d06820ebc9a86a67e2bebc;p=palacios.git FPU stub change to support more recent kernels --- diff --git a/linux_module/palacios-stubs.c b/linux_module/palacios-stubs.c index 1e1d17e..d5e27b3 100644 --- a/linux_module/palacios-stubs.c +++ b/linux_module/palacios-stubs.c @@ -832,10 +832,14 @@ palacios_mutex_unlock_irqrestore(void *mutex, void *flags) void palacios_used_fpu(void) { - struct thread_info *cur = current_thread_info(); - // We assume we are not preemptible here... +#ifndef TS_USEDFPU + struct task_struct *tsk = current; + tsk->thread.fpu.has_fpu = 1; +#else + struct thread_info *cur = current_thread_info(); cur->status |= TS_USEDFPU; +#endif clts(); // After this, FP Save should be handled by Linux if it // switches to a different task and that task uses FPU