X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Fvmm.c;h=ab9a5f6ce9efcd016decd2eedef9774d7ccb9db4;hb=ebf600fd1dc3b43e8100be168452c6e03b8a2dda;hp=70f51561a7717290798b8fa93fa277cff42101a5;hpb=8126d0d154dfd37ed7997f4fa78a1c179c4d2c81;p=palacios.releases.git diff --git a/palacios/src/geekos/vmm.c b/palacios/src/geekos/vmm.c index 70f5156..ab9a5f6 100644 --- a/palacios/src/geekos/vmm.c +++ b/palacios/src/geekos/vmm.c @@ -2,22 +2,34 @@ #include #include + uint_t vmm_cpu_type; -void Init_VMM() { + +struct vmm_os_hooks * os_hooks = NULL; + + + +void Init_VMM(struct vmm_os_hooks * hooks, struct vmm_ctrl_ops * vmm_ops) { vmm_cpu_type = VMM_INVALID_CPU; + os_hooks = hooks; + + + if (is_svm_capable()) { vmm_cpu_type = VMM_SVM_CPU; - Print("Machine is SVM Capable\n"); - Init_SVM(); + PrintDebug("Machine is SVM Capable\n"); + + Init_SVM(vmm_ops); + } else if (is_vmx_capable()) { vmm_cpu_type = VMM_VMX_CPU; - Print("Machine is VMX Capable\n"); + PrintDebug("Machine is VMX Capable\n"); Init_VMX(); } else { - PrintBoth("CPU has no virtualization Extensions\n"); + PrintDebug("CPU has no virtualization Extensions\n"); } }