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 #include <palacios/vmm_decoder.h>
9 v3_cpu_arch_t v3_cpu_type;
10 struct vmm_os_hooks * os_hooks = NULL;
14 struct guest_info * allocate_guest() {
15 void * info = V3_Malloc(sizeof(struct guest_info));
16 memset(info, 0, sizeof(struct guest_info));
22 void Init_V3(struct vmm_os_hooks * hooks, struct vmm_ctrl_ops * vmm_ops) {
25 v3_cpu_type = V3_INVALID_CPU;
29 if (is_svm_capable()) {
31 PrintDebug("Machine is SVM Capable\n");
32 vmm_ops->allocate_guest = &allocate_guest;
33 vmm_ops->config_guest = &config_guest;
37 } else if (is_vmx_capable()) {
38 vmm_cpu_type = VMM_VMX_CPU;
39 PrintDebug("Machine is VMX Capable\n");
42 PrintDebug("CPU has no virtualization Extensions\n");