From patchwork Wed Jul 28 10:05:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 114721 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6SA5cRM025697 for ; Wed, 28 Jul 2010 10:05:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754507Ab0G1KFg (ORCPT ); Wed, 28 Jul 2010 06:05:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28611 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754492Ab0G1KFf (ORCPT ); Wed, 28 Jul 2010 06:05:35 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6SA5VpS023576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Jul 2010 06:05:32 -0400 Received: from localhost.localdomain ([10.3.121.7]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6SA5UPk013550; Wed, 28 Jul 2010 06:05:30 -0400 From: Jes.Sorensen@redhat.com To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, anthony@codemonkey.ws Subject: [PATCH] Use kvm32/kvm64 as default CPUs when running under KVM. Date: Wed, 28 Jul 2010 12:05:27 +0200 Message-Id: <1280311527-2650-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 28 Jul 2010 10:05:38 +0000 (UTC) diff --git a/hw/pc.c b/hw/pc.c index 58dea57..b17a199 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -39,6 +39,7 @@ #include "msix.h" #include "sysbus.h" #include "sysemu.h" +#include "kvm.h" /* output Bochs bios info messages */ //#define DEBUG_BIOS @@ -866,11 +867,19 @@ void pc_cpus_init(const char *cpu_model) /* init CPUs */ if (cpu_model == NULL) { + if (kvm_enabled()) { #ifdef TARGET_X86_64 - cpu_model = "qemu64"; + cpu_model = "kvm64"; #else - cpu_model = "qemu32"; + cpu_model = "kvm32"; #endif + } else { +#ifdef TARGET_X86_64 + cpu_model = "qemu64"; +#else + cpu_model = "qemu32"; +#endif + } } for(i = 0; i < smp_cpus; i++) {