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.


*** empty log message ***
[palacios.git] / palacios / src / palacios / vmm.c
1 #include <palacios/vmm.h>
2 #include <palacios/svm.h>
3 #include <palacios/vmx.h>
4 #include <palacios/vmm_intr.h>
5 #include <palacios/vmm_config.h>
6 #include <palacios/vm_guest.h>
7
8 v3_cpu_arch_t v3_cpu_type;
9 struct vmm_os_hooks * os_hooks = NULL;
10
11
12
13 struct guest_info * allocate_guest() {
14   void * info = V3_Malloc(sizeof(struct guest_info));
15   memset(info, 0, sizeof(struct guest_info));
16   return info;
17 }
18
19
20
21 void Init_V3(struct vmm_os_hooks * hooks, struct vmm_ctrl_ops * vmm_ops) {
22   os_hooks = hooks;
23
24   v3_cpu_type = V3_INVALID_CPU;
25
26   if (is_svm_capable()) {
27
28     PrintDebug("Machine is SVM Capable\n");
29     vmm_ops->allocate_guest = &allocate_guest;
30     vmm_ops->config_guest = &config_guest;
31     Init_SVM(vmm_ops);
32
33     /*
34   } else if (is_vmx_capable()) {
35     vmm_cpu_type = VMM_VMX_CPU;
36     PrintDebug("Machine is VMX Capable\n");
37     //Init_VMX();*/
38   } else {
39     PrintDebug("CPU has no virtualization Extensions\n");
40   }
41 }
42
43
44 // Get CPU Type..
45