From patchwork Wed Jul 28 12:42:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 114755 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 o6SCgg0B021122 for ; Wed, 28 Jul 2010 12:42:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751759Ab0G1Mmm (ORCPT ); Wed, 28 Jul 2010 08:42:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45428 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417Ab0G1Mmd (ORCPT ); Wed, 28 Jul 2010 08:42:33 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6SCgUxr003535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Jul 2010 08:42:31 -0400 Received: from localhost.localdomain ([10.3.121.7]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6SCgQTq015728; Wed, 28 Jul 2010 08:42:29 -0400 From: Jes.Sorensen@redhat.com To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, anthony@codemonkey.ws, avi@redhat.com Subject: [PATCH 2/2] Use kvm32/kvm64 as default CPUs when running under KVM. 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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 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 12:42:55 +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++) {