Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Fix for floating point save/restore in case where fp context switching is turned off
[palacios.git] / palacios / include / palacios / vmm_fp.h
index 76b377d..0271458 100644 (file)
@@ -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