aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/i387.h
diff options
context:
space:
mode:
authorWei Huang <wei.huang2@amd.com>2011-05-09 11:39:23 +0100
committerWei Huang <wei.huang2@amd.com>2011-05-09 11:39:23 +0100
commit5968755d6dab2b3e193bdaf1d23658d3f1328a25 (patch)
treef4fb78f9015766fc70f665080abfa20daa9a91db /xen/include/asm-x86/i387.h
parent0217c28adbb1656e72ce68239eb6092fdc7cde0c (diff)
downloadxen-5968755d6dab2b3e193bdaf1d23658d3f1328a25.tar.gz
xen-5968755d6dab2b3e193bdaf1d23658d3f1328a25.tar.bz2
xen-5968755d6dab2b3e193bdaf1d23658d3f1328a25.zip
x86/fpu: create lazy and non-lazy FPU restore functions
Currently Xen relies on #NM (via CR0.TS) to trigger FPU context restore. But not all FPU state is tracked by TS bit. This function creates two FPU restore functions: vcpu_restore_fpu_lazy() and vcpu_restore_fpu_eager(). vcpu_restore_fpu_lazy() is still used when #NM is triggered. vcpu_restore_fpu_eager(), as a comparision, is called for vcpu which is being scheduled in on every context switch. To minimize restore overhead, it creates a flag, nonlazy_xstate_used, to control non-lazy restore. Signed-off-by: Wei Huang <wei.huang2@amd.com>
Diffstat (limited to 'xen/include/asm-x86/i387.h')
-rw-r--r--xen/include/asm-x86/i387.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/include/asm-x86/i387.h b/xen/include/asm-x86/i387.h
index f3a7df0229..27399c0bbf 100644
--- a/xen/include/asm-x86/i387.h
+++ b/xen/include/asm-x86/i387.h
@@ -14,7 +14,8 @@
#include <xen/types.h>
#include <xen/percpu.h>
-void vcpu_restore_fpu(struct vcpu *v);
+void vcpu_restore_fpu_eager(struct vcpu *v);
+void vcpu_restore_fpu_lazy(struct vcpu *v);
void vcpu_save_fpu(struct vcpu *v);
int vcpu_init_fpu(struct vcpu *v);