From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoDzx-0005tf-5I for qemu-devel@nongnu.org; Mon, 09 Jul 2012 09:27:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoDzs-0002JD-0x for qemu-devel@nongnu.org; Mon, 09 Jul 2012 09:27:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39122 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoDzr-0002Iq-Qy for qemu-devel@nongnu.org; Mon, 09 Jul 2012 09:27:27 -0400 From: Alexander Graf Date: Mon, 9 Jul 2012 14:11:39 +0200 Message-Id: <1341835899-3127-4-git-send-email-agraf@suse.de> In-Reply-To: <1341835899-3127-1-git-send-email-agraf@suse.de> References: <1341835899-3127-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH v3 3/3] i386: KVM: List -cpu host and best in -cpu ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel qemu-devel Cc: Avi Kivity , Ryan Harper , Anthony Liguori , KVM list , =?utf-8?q?Andreas=20F=C3=A4rber?= The kvm_enabled() helper doesn't work in a function as early as -cpu ? yet. It also doesn't make sense to list the -cpu ? output conditional on the -enable-kvm parameter. So let's always mention -cpu host in the CPU list when KVM is supported on that configuration. In addition, this patch also adds listing of -cpu best in the -cpu ? list, so that people know that this option exists. Signed-off-by: Alexander Graf --- target-i386/cpu.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index a5d9468..0000c77 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1190,9 +1190,10 @@ void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf, const char *optarg) (*cpu_fprintf)(f, "\n"); } } - if (kvm_enabled()) { - (*cpu_fprintf)(f, "x86 %16s\n", "[host]"); - } +#ifdef CONFIG_KVM + (*cpu_fprintf)(f, "x86 %16s\n", "KVM only: [host]"); + (*cpu_fprintf)(f, "x86 %16s\n", "KVM only: [best]"); +#endif } int cpu_x86_register(X86CPU *cpu, const char *cpu_model) -- 1.6.0.2