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.


code clean up
[palacios.git] / palacios / include / palacios / vmcb.h
index 5739eba..3b97500 100644 (file)
@@ -1,8 +1,10 @@
 #ifndef __VMCB_H
 #define __VMCB_H
 
-#include <palacios/vmm_types.h>
+#ifdef __V3VEE__
 
+#include <palacios/vmm_types.h>
+#include <palacios/vm_guest.h>
 
 #define VMCB_CTRL_AREA_OFFSET                   0x0
 #define VMCB_STATE_SAVE_AREA_OFFSET             0x400
@@ -63,26 +65,26 @@ struct Debug_Registers {
 
 
 struct Exception_Vectors {
-    uint_t de          : 1        PACKED; // divide by zero
-    uint_t db          : 1        PACKED; // Debug
-    uint_t nmi         : 1        PACKED; // Non-maskable interrupt
-    uint_t bp          : 1        PACKED; // Breakpoint
-    uint_t of          : 1        PACKED; // Overflow
-    uint_t br          : 1        PACKED; // Bound-Range
-    uint_t ud          : 1        PACKED; // Invalid-Opcode
-    uint_t nm          : 1        PACKED; // Device-not-available
-    uint_t df          : 1        PACKED; // Double Fault
+    uint_t de          : 1        PACKED; // (0) divide by zero
+    uint_t db          : 1        PACKED; // (1) Debug
+    uint_t nmi         : 1        PACKED; // (2) Non-maskable interrupt
+    uint_t bp          : 1        PACKED; // (3) Breakpoint
+    uint_t of          : 1        PACKED; // (4) Overflow
+    uint_t br          : 1        PACKED; // (5) Bound-Range
+    uint_t ud          : 1        PACKED; // (6) Invalid-Opcode
+    uint_t nm          : 1        PACKED; // (7) Device-not-available
+    uint_t df          : 1        PACKED; // (8) Double Fault
     uint_t ex9         : 1        PACKED; 
-    uint_t ts          : 1        PACKED; // Invalid TSS
-    uint_t np          : 1        PACKED; // Segment-not-present
-    uint_t ss          : 1        PACKED; // Stack
-    uint_t gp          : 1        PACKED; // General Protection Fault
-    uint_t pf          : 1        PACKED; // Page fault
+    uint_t ts          : 1        PACKED; // (10) Invalid TSS
+    uint_t np          : 1        PACKED; // (11) Segment-not-present
+    uint_t ss          : 1        PACKED; // (12) Stack
+    uint_t gp          : 1        PACKED; // (13) General Protection Fault
+    uint_t pf          : 1        PACKED; // (14) Page fault
     uint_t ex15        : 1        PACKED;
-    uint_t mf          : 1        PACKED; // Floating point exception
-    uint_t ac          : 1        PACKED; // Alignment-check
-    uint_t mc          : 1        PACKED; // Machine Check
-    uint_t xf          : 1        PACKED; // SIMD floating-point
+    uint_t mf          : 1        PACKED; // (15) Floating point exception
+    uint_t ac          : 1        PACKED; // (16) Alignment-check
+    uint_t mc          : 1        PACKED; // (17) Machine Check
+    uint_t xf          : 1        PACKED; // (18) SIMD floating-point
     uint_t ex20        : 1        PACKED;
     uint_t ex21        : 1        PACKED;
     uint_t ex22        : 1        PACKED;
@@ -93,7 +95,7 @@ struct Exception_Vectors {
     uint_t ex27        : 1        PACKED;
     uint_t ex28        : 1        PACKED;
     uint_t ex29        : 1        PACKED;
-    uint_t sx          : 1        PACKED; // Security Exception
+    uint_t sx          : 1        PACKED; // (30) Security Exception
     uint_t ex31        : 1        PACKED;
 };
 
@@ -357,4 +359,9 @@ typedef struct VMCB_State_Save_Area {
 void PrintDebugVMCB(vmcb_t * vmcb);
 
 
+void set_vmcb_segments(vmcb_t * vmcb, struct v3_segments * segs);
+void get_vmcb_segments(vmcb_t * vmcb, struct v3_segments * segs);
+
+#endif // ! __V3VEE__
+
 #endif