aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorBruce Rogers <brogers@suse.com>2012-08-09 12:47:40 -0600
committerBlue Swirl <blauwirbel@gmail.com>2012-08-09 19:53:01 +0000
commit3d1d9652978ac5a32a0beb4bdf6065ca39440d89 (patch)
tree2dd34aa0cc0e468db9b0513d48007bb821769241 /vl.c
parentd3da41e32bc6d6fac80d402aa1cc0f1d30539d98 (diff)
downloadqemu-3d1d9652978ac5a32a0beb4bdf6065ca39440d89.zip
qemu-3d1d9652978ac5a32a0beb4bdf6065ca39440d89.tar.gz
qemu-3d1d9652978ac5a32a0beb4bdf6065ca39440d89.tar.bz2
handle device help before accelerator set up
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 <brogers@suse.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index e71cb30..a4a520f 100644
--- a/vl.c
+++ b/vl.c
@@ -3345,6 +3345,11 @@ 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 +3505,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)