X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm.c;h=fea70091dce289d799c0e61b295e161c9c2f8dd6;hb=f3eb8bbb7c58c98b03797f2188e6c1d2a7610c15;hp=1203427da7881cc8a5a96d2245512375e51ed8a5;hpb=b90e3373d07b92968b28aef77f4dc68e6a264f12;p=palacios.git diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index 1203427..fea7009 100644 --- a/palacios/src/palacios/vmm.c +++ b/palacios/src/palacios/vmm.c @@ -18,8 +18,6 @@ */ #include -#include -#include #include #include #include @@ -27,7 +25,12 @@ #include #include - +#ifdef CONFIG_SVM +#include +#endif +#ifdef CONFIG_VMX +#include +#endif v3_cpu_arch_t v3_cpu_type; @@ -59,14 +62,22 @@ void Init_V3(struct v3_os_hooks * hooks, struct v3_ctrl_ops * vmm_ops) { vmm_ops->allocate_guest = &allocate_guest; +#ifdef CONFIG_SVM if (v3_is_svm_capable()) { PrintDebug("Machine is SVM Capable\n"); v3_init_SVM(vmm_ops); - } else if (v3_is_vmx_capable()) { - PrintDebug("Machine is VMX Capable\n"); - v3_init_vmx(vmm_ops); - } else { - PrintDebug("CPU has no virtualization Extensions\n"); + + } else +#endif +#ifdef CONFIG_VMX + if (v3_is_vmx_capable()) { + PrintDebug("Machine is VMX Capable\n"); + v3_init_vmx(vmm_ops); + + } else +#endif + { + PrintError("CPU has no virtualization Extensions\n"); } } @@ -130,3 +141,5 @@ void v3_yield(struct guest_info * info) { V3_Yield(); rdtscll(info->yield_start_cycle); } + +