From patchwork Sun Oct 30 20:23:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 122680 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C2D0CB6F76 for ; Mon, 31 Oct 2011 08:26:05 +1100 (EST) Received: from localhost ([::1]:59850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKbnS-0005OJ-5o for incoming@patchwork.ozlabs.org; Sun, 30 Oct 2011 16:15:58 -0400 Received: from eggs.gnu.org ([140.186.70.92]:43393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKbmR-0003l5-V0 for qemu-devel@nongnu.org; Sun, 30 Oct 2011 16:15:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKbmD-0002oi-Ez for qemu-devel@nongnu.org; Sun, 30 Oct 2011 16:14:55 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60680 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKbmC-0002nZ-Es; Sun, 30 Oct 2011 16:14:40 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 8BB6E8F0D1; Sun, 30 Oct 2011 21:14:38 +0100 (CET) From: Alexander Graf To: qemu-devel@nongnu.org Date: Sun, 30 Oct 2011 21:23:05 +0100 Message-Id: <1320006193-15219-15-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1320006193-15219-1-git-send-email-agraf@suse.de> References: <1320006193-15219-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Blue Swirl , qemu-ppc@nongnu.org, David Gibson Subject: [Qemu-devel] [PATCH 14/22] pseries: Under kvm use guest cpu = host cpu by default X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: David Gibson 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 Signed-off-by: Alexander Graf --- hw/spapr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/spapr.c b/hw/spapr.c index 4d2a55e..08c7399 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);