X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm.c;h=fea70091dce289d799c0e61b295e161c9c2f8dd6;hb=cfcceed5890430afedcc544bd7dbb69e29dfd65a;hp=82073f0619b6c54e1951f24c608698ddbc642572;hpb=9019b8dedfa7de9da84c55bc488a60a784231899;p=palacios.git diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index 82073f0..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"); } } @@ -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); } @@ -129,3 +141,5 @@ void v3_yield(struct guest_info * info) { V3_Yield(); rdtscll(info->yield_start_cycle); } + +