From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49209 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oe5xy-0005nm-Rn for qemu-devel@nongnu.org; Wed, 28 Jul 2010 08:42:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oe5xx-0006zn-25 for qemu-devel@nongnu.org; Wed, 28 Jul 2010 08:42:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41913) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oe5xw-0006zf-Ra for qemu-devel@nongnu.org; Wed, 28 Jul 2010 08:42:33 -0400 From: Jes.Sorensen@redhat.com Date: Wed, 28 Jul 2010 14:42:24 +0200 Message-Id: <1280320944-5560-3-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1280320944-5560-1-git-send-email-Jes.Sorensen@redhat.com> References: <1280320944-5560-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] Use kvm32/kvm64 as default CPUs when running under KVM. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, avi@redhat.com From: Jes Sorensen KVM has a minimum CPU requirement in order to run, so there is no reason to default to the very basic family 6, model 2 (or model 3 for qemu32) CPU since the additional features are going to be available on the host CPU. Signed-off-by: Jes Sorensen --- hw/pc.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) 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++) { -- 1.7.1.1