summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/fpu.h
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2012-12-12 08:35:32 +0000
committergrehan <grehan@FreeBSD.org>2012-12-12 08:35:32 +0000
commitaac6a44d7e468fc3fe77812ec3fe4dc5259f6499 (patch)
treecfc33458ee502cff4aa5f87a20d9d8f2f386021b /sys/amd64/include/fpu.h
parentf10e69982d73b15600dcf8e86eae036d0886ef98 (diff)
downloadFreeBSD-src-aac6a44d7e468fc3fe77812ec3fe4dc5259f6499.zip
FreeBSD-src-aac6a44d7e468fc3fe77812ec3fe4dc5259f6499.tar.gz
Implement an API to allow a hypervisor to save/restore
guest floating point state without having to know the size of floating-point state. Unstaticize fpurestore to allow the hypervisor to save/restore guest state using fpusave/fpurestore on the allocated FPU state area. Reviewed by: kib Obtained from: NetApp/bhyve MFC after: 1 week
Diffstat (limited to 'sys/amd64/include/fpu.h')
-rw-r--r--sys/amd64/include/fpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/amd64/include/fpu.h b/sys/amd64/include/fpu.h
index 7d0f0ea..1ce59d0 100644
--- a/sys/amd64/include/fpu.h
+++ b/sys/amd64/include/fpu.h
@@ -57,6 +57,7 @@ void fpuexit(struct thread *td);
int fpuformat(void);
int fpugetregs(struct thread *td);
void fpuinit(void);
+void fpurestore(void *addr);
void fpusave(void *addr);
int fpusetregs(struct thread *td, struct savefpu *addr,
char *xfpustate, size_t xfpustate_size);
@@ -73,6 +74,10 @@ int fpu_kern_leave(struct thread *td, struct fpu_kern_ctx *ctx);
int fpu_kern_thread(u_int flags);
int is_fpu_kern_thread(u_int flags);
+struct savefpu *fpu_save_area_alloc(void);
+void fpu_save_area_free(struct savefpu *fsa);
+void fpu_save_area_reset(struct savefpu *fsa);
+
/*
* Flags for fpu_kern_alloc_ctx(), fpu_kern_enter() and fpu_kern_thread().
*/
OpenPOWER on IntegriCloud