x86: Export FPU API for KVM use
Also add some constants. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
9373662463
commit
5ee481da7b
@ -482,6 +482,8 @@ static inline void fpu_copy(struct fpu *dst, struct fpu *src)
|
|||||||
memcpy(dst->state, src->state, xstate_size);
|
memcpy(dst->state, src->state, xstate_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern void fpu_finit(struct fpu *fpu);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#define PSHUFB_XMM5_XMM0 .byte 0x66, 0x0f, 0x38, 0x00, 0xc5
|
#define PSHUFB_XMM5_XMM0 .byte 0x66, 0x0f, 0x38, 0x00, 0xc5
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
|
|
||||||
#define FXSAVE_SIZE 512
|
#define FXSAVE_SIZE 512
|
||||||
|
|
||||||
|
#define XSTATE_YMM_SIZE 256
|
||||||
|
#define XSTATE_YMM_OFFSET (512 + 64)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are the features that the OS can handle currently.
|
* These are the features that the OS can handle currently.
|
||||||
*/
|
*/
|
||||||
|
@ -107,7 +107,7 @@ void __cpuinit fpu_init(void)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_X86_64 */
|
#endif /* CONFIG_X86_64 */
|
||||||
|
|
||||||
static void fpu_finit(struct fpu *fpu)
|
void fpu_finit(struct fpu *fpu)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
if (!HAVE_HWFP) {
|
if (!HAVE_HWFP) {
|
||||||
@ -132,6 +132,7 @@ static void fpu_finit(struct fpu *fpu)
|
|||||||
fp->fos = 0xffff0000u;
|
fp->fos = 0xffff0000u;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(fpu_finit);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The _current_ task is using the FPU for the first time
|
* The _current_ task is using the FPU for the first time
|
||||||
|
@ -28,6 +28,7 @@ unsigned long idle_nomwait;
|
|||||||
EXPORT_SYMBOL(idle_nomwait);
|
EXPORT_SYMBOL(idle_nomwait);
|
||||||
|
|
||||||
struct kmem_cache *task_xstate_cachep;
|
struct kmem_cache *task_xstate_cachep;
|
||||||
|
EXPORT_SYMBOL_GPL(task_xstate_cachep);
|
||||||
|
|
||||||
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
|
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user