X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_fp.h;h=0271458ca0fd5ac91a2de64bca99f207b64192fb;hb=ade1ede94c894363a3d4652d93540aef170b1276;hp=76b377d2df886008e3c10ec196dbae96076905fa;hpb=6bc36dbea509d599d3c6fdb42e1a9c67144f5023;p=palacios.git diff --git a/palacios/include/palacios/vmm_fp.h b/palacios/include/palacios/vmm_fp.h index 76b377d..0271458 100644 --- a/palacios/include/palacios/vmm_fp.h +++ b/palacios/include/palacios/vmm_fp.h @@ -163,8 +163,16 @@ int v3_deinit_fp(void); #ifndef V3_CONFIG_FP_SWITCH -#define V3_FP_EXIT_SAVE(core) -#define V3_FP_ENTRY_RESTORE(core) +/* Ideally these would use the TS trick to do lazy calls to used_fpu() */ +#define V3_FP_EXIT_SAVE(core) + +#define V3_FP_ENTRY_RESTORE(core) \ + do { \ + if ((core)->fp_state.need_restore) { \ + v3_put_fp_state(core); \ + (core)->fp_state.need_restore=0; \ + } \ + } while (0) #else