X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm.c;h=4beccea3f6d447a3e13a3214c2403fabd85920ff;hb=44cd68a3f5ee32889b833931af00adfb1a54f109;hp=82073f0619b6c54e1951f24c608698ddbc642572;hpb=9019b8dedfa7de9da84c55bc488a60a784231899;p=palacios-OLD.git diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index 82073f0..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"); } } @@ -117,9 +128,10 @@ void v3_yield_cond(struct guest_info * info) { if (cur_cycle > (info->yield_start_cycle + info->yield_cycle_period)) { - PrintDebug("Conditional Yield (cur_cyle=%p, start_cycle=%p, period=%p)\n", - (void *)cur_cycle, (void *)info->yield_start_cycle, (void *)info->yield_cycle_period); - + /* + PrintDebug("Conditional Yield (cur_cyle=%p, start_cycle=%p, period=%p)\n", + (void *)cur_cycle, (void *)info->yield_start_cycle, (void *)info->yield_cycle_period); + */ V3_Yield(); rdtscll(info->yield_start_cycle); }