1 /* 2 * include/asm-i386/i387.h 3 * 4 * Copyright (C) 1994 Linus Torvalds 5 * 6 * Pentium III FXSR, SSE support 7 * General FPU state handling cleanups 8 * Gareth Hughes <gareth@valinux.com>, May 2000 9 */ 10 11 #ifndef __ASM_I386_I387_H 12 #define __ASM_I386_I387_H 13 14 #include <xen/types.h> 15 16 /* Byte offset of the stored word size within the FXSAVE area/portion. */ 17 #define FPU_WORD_SIZE_OFFSET 511 18 19 struct ix87_env { 20 uint16_t fcw, _res0; 21 uint16_t fsw, _res1; 22 uint16_t ftw, _res2; 23 uint32_t fip; 24 uint16_t fcs; 25 uint16_t fop; 26 uint32_t fdp; 27 uint16_t fds, _res6; 28 }; 29 30 void vcpu_restore_fpu_nonlazy(struct vcpu *v, bool need_stts); 31 void vcpu_restore_fpu_lazy(struct vcpu *v); 32 void vcpu_save_fpu(struct vcpu *v); 33 void save_fpu_enable(void); 34 35 int vcpu_init_fpu(struct vcpu *v); 36 struct xsave_struct; 37 void vcpu_setup_fpu(struct vcpu *v, struct xsave_struct *xsave_area, 38 const void *data, unsigned int fcw_default); 39 void vcpu_destroy_fpu(struct vcpu *v); 40 #endif /* __ASM_I386_I387_H */ 41