if ( backout == X86EMUL_FPU_fpu )
{
/*
- * To back out changes to the register file simply adjust state such
- * that upon next FPU insn use by the guest we'll reload the state
- * saved (or freshly loaded) by hvmemul_get_fpu().
+ * To back out changes to the register file
+ * - in fully eager mode, restore original state immediately,
+ * - in lazy mode, simply adjust state such that upon next FPU insn
+ * use by the guest we'll reload the state saved (or freshly loaded)
+ * by hvmemul_get_fpu().
*/
- curr->fpu_dirtied = false;
- stts();
- hvm_funcs.fpu_leave(curr);
+ if ( curr->arch.fully_eager_fpu )
+ vcpu_restore_fpu_eager(curr);
+ else
+ {
+ curr->fpu_dirtied = false;
+ stts();
+ hvm_funcs.fpu_leave(curr);
+ }
}
}