bhyve needs fpu import/export
One of the pieces of in-kernel bhyve state which cannot be manipulated during the lifetime of a guest instance is the FPU. While the VMM faithfully restores and saves its contents on guest entry and exit (respectively), there is no way to access that saved state from userspace, or inject a different state to restore on a later run (as would be needed for migration of a guest). We need an interface for userspace to import and export vCPU FPU state. Care must be taken while doing so, as
XRSTOR will emit
#gp if the to-be-loaded data is invalid. When importing data from userspace, we must validate it with the protection of
on_fault to ensure that it will not cause problems when being loaded for the guest. It would also be nice if the data structures for import/export had adequate associated metadata to communicate capabilities (SSE, AVX, AVX512) and sizing of the involved data.