From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REGqS-0000dt-L5 for qemu-devel@nongnu.org; Thu, 13 Oct 2011 04:40:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1REGqM-0003NI-KR for qemu-devel@nongnu.org; Thu, 13 Oct 2011 04:40:52 -0400 Received: from ozlabs.org ([203.10.76.45]:40751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REGqM-0003Mq-5b for qemu-devel@nongnu.org; Thu, 13 Oct 2011 04:40:46 -0400 From: David Gibson Date: Thu, 13 Oct 2011 19:40:34 +1100 Message-Id: <1318495234-24196-5-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1318495234-24196-1-git-send-email-david@gibson.dropbear.id.au> References: <1318495234-24196-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [PATCH 4/4] pseries: Under kvm use guest cpu = host cpu by default List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: agraf@suse.de Cc: qemu-devel@nongnu.org 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 --- hw/spapr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/spapr.c b/hw/spapr.c index 00b9c67..fecfa4a 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -403,7 +403,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); -- 1.7.6.3