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.


Added shadow page handling, IO and MSR bitmap allocation, and started
[palacios.git] / palacios / include / palacios / vmcs.h
index b3e1bb8..491f80e 100644 (file)
@@ -41,6 +41,8 @@
 #define   MWAIT_EXIT                    0x00000400
 #define   RDPMC_EXIT                    0x00000800
 #define   RDTSC_EXIT                    0x00001000
+#define   CR3_LOAD_EXIT                 0x00008000
+#define   CR3_STORE_EXIT                0x00010000
 #define   CR8_LOAD_EXIT                 0x00080000
 #define   CR8_STORE_EXIT                0x00100000
 #define   USE_TPR_SHADOW                0x00200000
@@ -51,6 +53,7 @@
 #define   USE_MSR_BITMAPS               0x10000000
 #define   MONITOR_EXIT                  0x20000000
 #define   PAUSE_EXIT                    0x40000000
+#define   ACTIVE_SEC_CTRLS              0x80000000
 /* VM-Exit Controls */
 /* INTEL MANUAL: 20-16 vol. 3B */
 #define   HOST_ADDR_SPACE_SIZE          0x00000200
@@ -92,6 +95,8 @@ typedef enum {
     VMCS_TSC_OFFSET_HIGH              = 0x00002011,
     VMCS_VAPIC_ADDR                   = 0x00002012,
     VMCS_VAPIC_ADDR_HIGH              = 0x00002013,
+    VMCS_APIC_ACCESS_ADDR             = 0x00002014,
+    VMCS_APIC_ACCESS_ADDR_HIGH        = 0x00002015,
     /* 64 bit guest state fields */
     VMCS_LINK_PTR                     = 0x00002800,
     VMCS_LINK_PTR_HIGH                = 0x00002801,
@@ -99,6 +104,9 @@ typedef enum {
     VMCS_GUEST_DBG_CTL_HIGH          = 0x00002803,
     VMCS_GUEST_PERF_GLOBAL_CTRL       = 0x00002808,
     VMCS_GUEST_PERF_GLOBAL_CTRL_HIGH  = 0x00002809,
+
+    VMCS_HOST_PERF_GLOBAL_CTRL        = 0x00002c04,
+    VMCS_HOST_PERF_GLOBAL_CTRL_HIGH   = 0x00002c05,
     /* 32 bit control fields */
     VMCS_PIN_CTRLS                    = 0x00004000,
     VMCS_PROC_CTRLS                   = 0x00004002,
@@ -115,6 +123,7 @@ typedef enum {
     VMCS_ENTRY_EXCP_ERR               = 0x00004018,
     VMCS_ENTRY_INSTR_LEN              = 0x0000401A,
     VMCS_TPR_THRESHOLD                = 0x0000401C,
+    VMCS_SEC_PROC_CTRLS               = 0x0000401e,
     /* 32 bit Read Only data fields */
     VMCS_INSTR_ERR                    = 0x00004400,
     VMCS_EXIT_REASON                  = 0x00004402,
@@ -202,10 +211,13 @@ typedef enum {
 } vmcs_field_t;
 
 int v3_vmcs_get_field_len(vmcs_field_t field);
+const char* v3_vmcs_field_to_str(vmcs_field_t field);
+void v3_print_vmcs();
+
 
 
 /* VMCS Exit QUALIFICATIONs */
-struct VMExitIOQual {
+struct vmcs_io_qual {
     uint32_t accessSize : 3; // (0: 1 Byte ;; 1: 2 Bytes ;; 3: 4 Bytes)
     uint32_t dir        : 1; // (0: Out ;; 1: In)
     uint32_t string     : 1; // (0: not string ;; 1: string)
@@ -287,7 +299,7 @@ struct vmcs_segment_access {
            uint32_t    rsvd1       : 4;
            uint32_t    avail       : 1;
            uint32_t    long_mode   : 1; // CS only (64 bit active), reserved otherwise
-           uint32_t    DB          : 1; 
+           uint32_t    db          : 1; 
            uint32_t    granularity : 1;
            uint32_t    unusable    : 1; 
            uint32_t    rsvd2       : 15;