} 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");
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");
}
}
(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;
}