aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2009-07-16 22:20:22 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-16 22:20:22 -0500
commit5e6500026030eccd95fb4bdacd9f5d6bbed1d929 (patch)
tree5517f93e78a23f4e798333ff88e72bc9e8b19d69 /target-i386
parent0d35bf2d07668c0f749633c4dcc5a4527a37984c (diff)
downloadqemu-5e6500026030eccd95fb4bdacd9f5d6bbed1d929.zip
qemu-5e6500026030eccd95fb4bdacd9f5d6bbed1d929.tar.gz
qemu-5e6500026030eccd95fb4bdacd9f5d6bbed1d929.tar.bz2
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>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/helper.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 5f33533..dd89885 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -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));
}