From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Rogers Subject: [PATCH] handle device help before accelerator set up Date: Wed, 8 Aug 2012 12:40:59 -0600 Message-ID: <1344451259-21160-1-git-send-email-brogers@suse.com> Cc: Bruce Rogers To: kvm@vger.kernel.org Return-path: Received: from [137.65.135.21] ([137.65.135.21]:57495 "EHLO suse.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1757862Ab2HHSlG (ORCPT ); Wed, 8 Aug 2012 14:41:06 -0400 Sender: kvm-owner@vger.kernel.org List-ID: 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 1a46d2d..5b75cf9 100644 --- a/vl.c +++ b/vl.c @@ -3380,6 +3380,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(); @@ -3535,9 +3538,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) -- 1.7.7