From patchwork Thu Aug 9 13:23:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Rogers X-Patchwork-Id: 176113 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 224362C00D0 for ; Fri, 10 Aug 2012 00:02:45 +1000 (EST) Received: from localhost ([::1]:48017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzTJz-0002yP-1P for incoming@patchwork.ozlabs.org; Thu, 09 Aug 2012 10:02:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzTJl-0002wo-Pu for qemu-devel@nongnu.org; Thu, 09 Aug 2012 10:02:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzTJf-00033u-TV for qemu-devel@nongnu.org; Thu, 09 Aug 2012 10:02:29 -0400 Received: from 63-248-41-43.static.orml012.digis.net ([63.248.41.43]:50509 helo=suse.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzTJf-00033q-MX for qemu-devel@nongnu.org; Thu, 09 Aug 2012 10:02:23 -0400 Received: by suse.com (Postfix, from userid 1000) id 0A85430C6B6; Thu, 9 Aug 2012 07:23:20 -0600 (MDT) From: Bruce Rogers To: qemu-devel@nongnu.org Date: Thu, 9 Aug 2012 07:23:18 -0600 Message-Id: <1344518598-22651-1-git-send-email-brogers@suse.com> X-Mailer: git-send-email 1.7.7 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 63.248.41.43 Cc: Bruce Rogers Subject: [Qemu-devel] [PATCH] handle device help before accelerator set up X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org A command line device probe using just -device "?" gets processed after qemu-kvm initializes the accelerator. If /dev/kvm is not present, the accelerator check will fail (kvm is defaulted to on), which causes libvirt to not be set up to handle qemu guests. Moving the device help handling before the accelerator set up allows the device probe to work in this configuration and libvirt succeeds in setting up for a qemu hypervisor mode. Signed-off-by: Bruce Rogers --- vl.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vl.c b/vl.c index e71cb30..205b924 100644 --- a/vl.c +++ b/vl.c @@ -3345,6 +3345,9 @@ int main(int argc, char **argv, char **envp) ram_size = DEFAULT_RAM_SIZE * 1024 * 1024; } + if (qemu_opts_foreach(qemu_find_opts("device"), device_help_func, NULL, 0) != 0) + exit(0); + configure_accelerator(); qemu_init_cpu_loop(); @@ -3500,9 +3503,6 @@ int main(int argc, char **argv, char **envp) } select_vgahw(vga_model); - if (qemu_opts_foreach(qemu_find_opts("device"), device_help_func, NULL, 0) != 0) - exit(0); - if (watchdog) { i = select_watchdog(watchdog); if (i > 0)