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.


vmx cleanup
[palacios.git] / palacios / include / palacios / vmx_hw_info.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 <jarusl@cs.northwestern.edu> 
11  * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org> 
12  * All rights reserved.
13  *
14  * Author: Jack Lange <jarusl@cs.northwestern.edu>
15  *
16  * This is free software.  You are permitted to use,
17  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
18  */
19
20
21 #ifndef __VMX_HW_INFO_H__
22 #define __VMX_HW_INFO_H__
23
24 #ifdef __V3VEE__
25
26
27 #define VMX_BASIC_MSR               0x00000480
28 #define VMX_PINBASED_CTLS_MSR       0x00000481
29 #define VMX_PROCBASED_CTLS_MSR      0x00000482
30 #define VMX_EXIT_CTLS_MSR           0x00000483
31 #define VMX_ENTRY_CTLS_MSR          0x00000484
32 #define VMX_MISC_MSR                0x00000485
33 #define VMX_CR0_FIXED0_MSR          0x00000486
34 #define VMX_CR0_FIXED1_MSR          0x00000487
35 #define VMX_CR4_FIXED0_MSR          0x00000488
36 #define VMX_CR4_FIXED1_MSR          0x00000489
37 #define VMX_VMCS_ENUM_MSR           0x0000048A
38
39
40
41
42 struct vmx_basic_msr {
43     union {
44         uint32_t lo;
45         uint32_t hi;
46         struct {
47             uint32_t revision;
48             uint32_t regionSize   : 13;
49             uint8_t rsvd1         : 4; /* Always 0 */
50             uint8_t physWidth     : 1; /* VMCS address field widths 
51                                           (1=32bits, 0=natural width) */
52             uint8_t smm           : 1; // Always 1
53             uint8_t memType       : 4; /* 0 = UC, 6 = WriteBack */
54             uint8_t io_str_info   : 1;
55             uint8_t def1_maybe_0  : 1; /* 1="Any VMX ctrls that default to 1 may be cleared to 0" */
56             uint32_t rsvd2        : 8; /* Always 0 */
57         }  __attribute__((packed));
58     }  __attribute__((packed));
59 }  __attribute__((packed));
60
61
62
63
64
65 struct vmx_hw_info {
66     struct vmx_basic_msr basic_info;
67     
68
69
70 };
71
72
73 int v3_init_vmx_hw();
74
75
76
77
78 #endif
79
80 #endif