To let the user configure the desired tsc frequency for the
guest if running in KVM.
@@ -704,6 +705,14 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def,
const char *cpu_model)
} else if (!strcmp(featurestr, "model_id")) {
pstrcpy(x86_cpu_def->model_id, sizeof(x86_cpu_def->model_id),
val);
+ } else if (!strcmp(featurestr, "tsc_khz")) {
+ char *err;
+ numvalue = strtoul(val,&err, 0);
+ if (!*val || *err) {
+ fprintf(stderr, "bad numerical value %s\n", val);
+ goto error;
+ }
+ x86_cpu_def->tsc_khz = numvalue;
} else {
fprintf(stderr, "unrecognized feature %s\n", featurestr);
goto error;