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>
8 v3_cpu_arch_t v3_cpu_type;
9 struct vmm_os_hooks * os_hooks = NULL;
13 struct guest_info * allocate_guest() {
14 void * info = V3_Malloc(sizeof(struct guest_info));
15 memset(info, 0, sizeof(struct guest_info));
21 void Init_V3(struct vmm_os_hooks * hooks, struct vmm_ctrl_ops * vmm_ops) {
24 v3_cpu_type = V3_INVALID_CPU;
26 if (is_svm_capable()) {
28 PrintDebug("Machine is SVM Capable\n");
29 vmm_ops->allocate_guest = &allocate_guest;
30 vmm_ops->config_guest = &config_guest;
34 } else if (is_vmx_capable()) {
35 vmm_cpu_type = VMM_VMX_CPU;
36 PrintDebug("Machine is VMX Capable\n");
39 PrintDebug("CPU has no virtualization Extensions\n");