From patchwork Tue Jun 1 23:03:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 103668 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o51N8tb7007141 for ; Tue, 1 Jun 2010 23:08:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754605Ab0FAXIr (ORCPT ); Tue, 1 Jun 2010 19:08:47 -0400 Received: from qmta04.emeryville.ca.mail.comcast.net ([76.96.30.40]:40330 "EHLO qmta04.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751364Ab0FAXIr (ORCPT ); Tue, 1 Jun 2010 19:08:47 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 01 Jun 2010 23:08:55 +0000 (UTC) X-Greylist: delayed 345 seconds by postgrey-1.27 at vger.kernel.org; Tue, 01 Jun 2010 19:08:47 EDT Received: from omta11.emeryville.ca.mail.comcast.net ([76.96.30.36]) by qmta04.emeryville.ca.mail.comcast.net with comcast id QcBq1e0050mlR8UA4n32he; Tue, 01 Jun 2010 23:03:02 +0000 Received: from localhost.localdomain ([75.71.122.219]) by omta11.emeryville.ca.mail.comcast.net with comcast id Qn301e00N4k7Kz78Xn31LM; Tue, 01 Jun 2010 23:03:01 +0000 From: Alex Williamson Subject: [PATCH] pc: push setting default cpu_model down a level To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, alex.williamson@redhat.com Date: Tue, 01 Jun 2010 17:03:00 -0600 Message-ID: <20100601230235.14944.69041.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/hw/pc.c b/hw/pc.c index 9b85c42..a79586c 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -771,6 +771,14 @@ static CPUState *pc_new_cpu(const char *cpu_model) { CPUState *env; + if (cpu_model == NULL) { +#ifdef TARGET_X86_64 + cpu_model = "qemu64"; +#else + cpu_model = "qemu32"; +#endif + } + env = cpu_init(cpu_model); if (!env) { fprintf(stderr, "Unable to find x86 CPU definition\n"); @@ -791,14 +799,6 @@ void pc_cpus_init(const char *cpu_model) int i; /* init CPUs */ - if (cpu_model == NULL) { -#ifdef TARGET_X86_64 - cpu_model = "qemu64"; -#else - cpu_model = "qemu32"; -#endif - } - for(i = 0; i < smp_cpus; i++) { pc_new_cpu(cpu_model); }