From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWVYx-0006Yo-Sm for qemu-devel@nongnu.org; Tue, 14 Jun 2011 11:29:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWVYw-0005H4-3B for qemu-devel@nongnu.org; Tue, 14 Jun 2011 11:29:55 -0400 Received: from cantor.suse.de ([195.135.220.2]:53135 helo=mx1.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWVYv-0005Gg-CL for qemu-devel@nongnu.org; Tue, 14 Jun 2011 11:29:53 -0400 From: Alexander Graf Date: Tue, 14 Jun 2011 17:29:49 +0200 Message-Id: <1308065389-11945-4-git-send-email-agraf@suse.de> In-Reply-To: <1308065389-11945-1-git-send-email-agraf@suse.de> References: <1308065389-11945-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 3/3] pc: use -cpu host as default for kvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org Developers" Cc: Anthony Liguori When running with KVM, people expect to get the best possible performance inside the VM. To really get this, the guest needs to know about the CPU features it can use. We have a CPU type that exports exactly this information to the guest, but hasn't been used much, as it wasn't the default. Set it as default for the PC machine now, so people get good performance without changing options. Signed-off-by: Alexander Graf --- hw/pc.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index a3e8539..475d20e 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -41,6 +41,7 @@ #include "sysemu.h" #include "blockdev.h" #include "ui/qemu-spice.h" +#include "kvm.h" /* output Bochs bios info messages */ //#define DEBUG_BIOS @@ -945,11 +946,15 @@ void pc_cpus_init(const char *cpu_model) /* init CPUs */ if (cpu_model == NULL) { + if (kvm_enabled()) { + cpu_model = "host"; + } else { #ifdef TARGET_X86_64 - cpu_model = "qemu64"; + cpu_model = "qemu64"; #else - cpu_model = "qemu32"; + cpu_model = "qemu32"; #endif + } } for(i = 0; i < smp_cpus; i++) { -- 1.7.3.4