X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm.c;h=4beccea3f6d447a3e13a3214c2403fabd85920ff;hb=7c9087090f06a3fdf041f650912c36b6b12d7a82;hp=1203427da7881cc8a5a96d2245512375e51ed8a5;hpb=29056b18227989f85d7cc6ba4cbb3165e78be3b5;p=palacios.git diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index 1203427..4beccea 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"); } }