X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_time.c;h=a028b2f45d7d880f74a226376e40a993ca438c96;hb=198151f1d58834ff7889389007232a3d250f51f1;hp=a88b978c742219501af2098062e44d9a431498d9;hpb=c0ecfba627c1d6c3f46d59bd4e5e6f883a494dc4;p=palacios.git diff --git a/palacios/src/palacios/vmm_time.c b/palacios/src/palacios/vmm_time.c index a88b978..a028b2f 100644 --- a/palacios/src/palacios/vmm_time.c +++ b/palacios/src/palacios/vmm_time.c @@ -346,7 +346,7 @@ handle_time_configuration(struct v3_vm_info * vm, v3_cfg_tree_t *cfg) { } else { PrintDebug(vm, VCORE_NONE,"VM time slaved to host TSC.\n"); } - } + } // Should we make a separate TSC device that handles this sort of thing? tsc = v3_cfg_val(cfg, "tsc"); @@ -356,7 +356,7 @@ handle_time_configuration(struct v3_vm_info * vm, v3_cfg_tree_t *cfg) { PrintError(vm, VCORE_NONE, "WARNING: Guest TSC set to passthrough host TSC, but guest time not slaved to host time."); } vm->time_state.flags |= V3_TIME_TSC_PASSTHROUGH; - } else if (strcasecmp(source, "guest") != 0) { + } else if (!source || (strcasecmp(source, "guest") != 0)) { PrintError(vm, VCORE_NONE, "ERROR: Unknown TSC configuration in time configuration.\n"); } } @@ -499,7 +499,7 @@ void v3_init_time_core(struct guest_info * info) { (time_state->clock_ratio_num != 1) || (info->vm_info->time_state.td_num != 1) || (info->vm_info->time_state.td_denom != 1)) { - if (time_state->flags | VM_TIME_TSC_PASSTHROUGH) { + if (time_state->flags & VM_TIME_TSC_PASSTHROUGH) { PrintError(info->vm_info, info, "WARNING: Cannot use reqested passthrough TSC with clock or time modification also requested.\n"); time_state->flags &= ~VM_TIME_TSC_PASSTHROUGH; }