提交 3d1d9652 编写于 作者: B Bruce Rogers 提交者: Blue Swirl

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: NBruce Rogers <brogers@suse.com>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 d3da41e3
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册