sim-card
/
qemu
Archived
10
0
Fork 0

Only allow -cpu host when KVM is enabled

-cpu host is not at all useful when using tcg.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2009-07-16 22:20:22 -05:00
parent 0d35bf2d07
commit 5e65000260
1 changed files with 3 additions and 4 deletions

View File

@ -358,11 +358,10 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
break;
}
}
if (!def) {
if (strcmp(name, "host") != 0) {
goto error;
}
if (kvm_enabled() && strcmp(name, "host") == 0) {
cpu_x86_fill_host(x86_cpu_def);
} else if (!def) {
goto error;
} else {
memcpy(x86_cpu_def, def, sizeof(*def));
}