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.


Multithread handling of VNET
[palacios.git] / palacios / include / palacios / vmx_ept.h
1 /* 
2  * This file is part of the Palacios Virtual Machine Monitor developed
3  * by the V3VEE Project with funding from the United States National 
4  * Science Foundation and the Department of Energy.  
5  *
6  * The V3VEE Project is a joint project between Northwestern University
7  * and the University of New Mexico.  You can find out more at 
8  * http://www.v3vee.org
9  *
10  * Copyright (c) 2011, Jack Lange <jacklange@cs.pitt.edu> 
11  * All rights reserved.
12  *
13  * Author: Jack Lange <jacklange@cs.pitt.edu>
14  *
15  * This is free software.  You are permitted to use,
16  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
17  */
18
19
20 #ifndef __VMX_EPT_H__
21 #define __VMX_EPT_H__
22
23
24 #ifdef __V3VEE__
25
26 /* The actual format of these data structures is specified as being machine 
27    dependent. Thus the lengths of the base address fields are defined as variable. 
28    To be safe we assume the maximum(?) size fields 
29 */
30
31
32 typedef struct vmx_eptp {
33     uint8_t psmt            : 3;
34     uint8_t pwl1            : 3;
35     uint8_t rsvd1           : 6;
36     uint64_t pml_base_addr  : 39;
37     uint16_t rsvd2          : 13;
38 } __attribute__((packed)) vmx_eptp_t;
39
40
41 typedef struct vmx_pml4 {
42     uint8_t read            : 1;
43     uint8_t write           : 1;
44     uint8_t exec            : 1;
45     uint8_t rsvd1           : 5;
46     uint8_t ignore1         : 4;
47     uint64_t pdp_base_addr  : 39;
48     uint8_t rsvd2           : 1;
49     uint32_t ignore2        : 12;
50 } __attribute__((packed)) vmx_pml4_t;
51
52
53 typedef struct vmx_pdp_1GB {
54     uint8_t read            : 1;
55     uint8_t write           : 1;
56     uint8_t exec            : 1;
57     uint8_t mt              : 3;
58     uint8_t ipat            : 1;
59     uint8_t large_page      : 1;
60     uint8_t ignore1         : 4;
61     uint32_t rsvd1          : 18;
62     uint32_t page_base_addr : 21;
63     uint8_t rsvd2           : 1;
64     uint32_t ignore2        : 12;
65 } __attribute__((packed)) vmx_pdp_1GB_t;
66
67 typedef struct vmx_pdp {
68     uint8_t read            : 1;
69     uint8_t write           : 1;
70     uint8_t exec            : 1;
71     uint8_t rsvd1           : 4;
72     uint8_t large_page      : 1;
73     uint8_t ignore1         : 4;
74     uint32_t page_base_addr : 39;
75     uint8_t rsvd2           : 1;
76     uint32_t ignore2        : 12;
77 } __attribute__((packed)) vmx_pdp_t;
78
79
80 typedef struct vmx_pde_2MB {
81     uint8_t read            : 1;
82     uint8_t write           : 1;
83     uint8_t exec            : 1;
84     uint8_t mt              : 3;
85     uint8_t ipat            : 1;
86     uint8_t large_page      : 1;
87     uint8_t ignore1         : 4;
88     uint32_t rsvd1          : 9;
89     uint32_t page_base_addr : 30;
90     uint8_t rsvd2           : 1;
91     uint32_t ignore2        : 12;
92 } __attribute__((packed)) vmx_pde_2MB_t;
93
94
95 typedef struct vmx_pde {
96     uint8_t read            : 1;
97     uint8_t write           : 1;
98     uint8_t exec            : 1;
99     uint8_t rsvd1           : 4;
100     uint8_t large_page      : 1;
101     uint8_t ignore1         : 4;
102     uint32_t page_base_addr : 39;
103     uint8_t rsvd2           : 1;
104     uint32_t ignore2        : 12;
105 } __attribute__((packed)) vmx_pde_t;
106
107
108
109 typedef struct vmx_pte {
110     uint8_t read            : 1;
111     uint8_t write           : 1;
112     uint8_t exec            : 1;
113     uint8_t mt              : 3;
114     uint8_t ipat            : 1;
115     uint8_t ignore1         : 5;
116     uint32_t page_base_addr : 39;
117     uint8_t rsvd2           : 1;
118     uint32_t ignore2        : 12;
119 } __attribute__((packed)) vmx_pte_t;
120
121 #endif 
122
123 #endif
124