提交 5e650002 编写于 作者: A Anthony Liguori

Only allow -cpu host when KVM is enabled

-cpu host is not at all useful when using tcg.
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 0d35bf2d
...@@ -358,11 +358,10 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model) ...@@ -358,11 +358,10 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
break; break;
} }
} }
if (!def) { if (kvm_enabled() && strcmp(name, "host") == 0) {
if (strcmp(name, "host") != 0) {
goto error;
}
cpu_x86_fill_host(x86_cpu_def); cpu_x86_fill_host(x86_cpu_def);
} else if (!def) {
goto error;
} else { } else {
memcpy(x86_cpu_def, def, sizeof(*def)); memcpy(x86_cpu_def, def, sizeof(*def));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册