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 / src / palacios / vmx_hw_info.c
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 #include <palacios/vmm.h>
21 #include <palacios/vmm_lowlevel.h>
22 #include <palacios/vmx_hw_info.h>
23
24
25 // Intel VMX Feature MSRs
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
43
44
45 int v3_init_vmx_hw(struct vmx_hw_info * hw_info) {
46     //  extern v3_cpu_arch_t v3_cpu_types[];
47
48     memset(hw_info, 0, sizeof(struct vmx_hw_info));
49
50     v3_get_msr(VMX_BASIC_MSR, &(hw_info->basic_info.hi), &(hw_info->basic_info.lo));
51     
52
53
54     /*
55     if (has_vmx_nested_paging() == 1) {
56         v3_cpu_types[cpu_id] = V3_VMX_EPT_CPU;
57     } else {
58         v3_cpu_types[cpu_id] = V3_VMX_CPU;
59     }
60     */
61     return 0;
62 }