From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URu3S-0006hZ-UC for qemu-devel@nongnu.org; Mon, 15 Apr 2013 20:47:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URu3R-0006eS-Si for qemu-devel@nongnu.org; Mon, 15 Apr 2013 20:47:26 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55462 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URu3R-0006eD-MC for qemu-devel@nongnu.org; Mon, 15 Apr 2013 20:47:25 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 16 Apr 2013 02:46:38 +0200 Message-Id: <1366073209-27119-2-git-send-email-afaerber@suse.de> In-Reply-To: <1366073209-27119-1-git-send-email-afaerber@suse.de> References: <1366073209-27119-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 01/12] target-i386: Fix including "host" in -cpu ? output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jan Kiszka , =?UTF-8?q?Andreas=20F=C3=A4rber?= From: Jan Kiszka kvm_enabled() cannot be true at this point because accelerators are initialized much later during init. Also, hiding this makes it very hard to discover for users. Simply dump unconditionally if CONFIG_KVM is set. Add explanation for "host" CPU type. Signed-off-by: Jan Kiszka Reviewed-by: Igor Mammedov Signed-off-by: Andreas F=C3=A4rber --- target-i386/cpu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 6dd993f..b8690d2 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1463,9 +1463,12 @@ void x86_cpu_list(FILE *f, fprintf_function cpu_fp= rintf) snprintf(buf, sizeof(buf), "%s", def->name); (*cpu_fprintf)(f, "x86 %16s %-48s\n", buf, def->model_id); } - if (kvm_enabled()) { - (*cpu_fprintf)(f, "x86 %16s\n", "[host]"); - } +#ifdef CONFIG_KVM + (*cpu_fprintf)(f, "x86 %16s %-48s\n", "host", + "KVM processor with all supported host features " + "(only available in KVM mode)"); +#endif + (*cpu_fprintf)(f, "\nRecognized CPUID flags:\n"); listflags(buf, sizeof(buf), (uint32_t)~0, feature_name, 1); (*cpu_fprintf)(f, " %s\n", buf); --=20 1.8.1.4