aboutsummaryrefslogtreecommitdiffstats
path: root/hw/spapr.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2011-10-12 22:40:34 +0000
committerAlexander Graf <agraf@suse.de>2011-10-30 17:11:54 +0100
commit6b7a2cf6d93294a4e7c79fe101d31fc19d04fb48 (patch)
tree2889d73500b9f674e3e9741936e7280d37e4f6c3 /hw/spapr.c
parent37e305ce167279307335b069bff7e254b858fa6b (diff)
pseries: Under kvm use guest cpu = host cpu by default
Now that we've implemented -cpu host for ppc, this patch updates the pseries machine to use the host cpu as the guest cpu by default when running under KVM. This is important because under KVM Book3S-HV the guest cpu _cannot_ be of a different type to the host cpu (at the moment KVM Book3S-HV will silently virtualize the host cpu instead of whatever was requested, but in future it is likely to simply refuse to run the VM if a cpu model other than the host's is requested). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/spapr.c')
-rw-r--r--hw/spapr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/spapr.c b/hw/spapr.c
index 4d2a55e35..08c7399fe 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -406,7 +406,7 @@ static void ppc_spapr_init(ram_addr_t ram_size,
/* init CPUs */
if (cpu_model == NULL) {
- cpu_model = "POWER7";
+ cpu_model = kvm_enabled() ? "host" : "POWER7";
}
for (i = 0; i < smp_cpus; i++) {
env = cpu_init(cpu_model);