guest will be destroyed when create guest with parameter "-usbdevice tablet".

Bug #1406706 reported by chao zhou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

Environment:
------------
Host OS (ia32/ia32e/IA64):ia32e
Guest OS (ia32/ia32e/IA64):ia32e
Guest OS Type (Linux/Windows):windows
kvm.git Commit:2c4aa55a6af070262cca425745e8e54310e96b8d
qemu.git Commit:ab0302ee764fd702465aef6d88612cdff4302809
Host Kernel Version:3.18.0-rc3
Hardware: Ivytown_EP,Haswell_EP

Bug detailed description:
--------------------------
when create guest with parameter "-usbdevice tablet", then guest will be destroyed.

note:
this shoule be a qemu bug:
kvm + qemu = result
2c4aa55a + ab0302ee = bad
2c4aa55a + 54600752 = good

Reproduce steps:
----------------
1. create guest
qemu-system-x86_64 --enable-kvm -m 4G smp 2 -net none win8.1.qcow -usbdevice tablet

Current result:
----------------
the guest will be destroyed when create guest with "-usbdevice tablet"

Expected result:
----------------
the guest works fine when create guest with "-usbdevice tablet"

Basic root-causing log:
----------------------
[root@vt-hsw2 ~]# qemu-system-x86_64 -enable-kvm -m 4G -smp 2 -net none /root/cathy/win8.1.qcow -usbdevice tablet
qemu-system-x86_64: util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed.
Aborted (core dumped)

Revision history for this message
Tiejun Chen (tiejun-chen) wrote :

Could you test this?

Signed-off-by: Tiejun Chen <email address hidden>
---
 util/qemu-option.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/qemu-option.c b/util/qemu-option.c
index a708241..7cb3601 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -377,7 +377,7 @@ static bool qemu_opt_get_bool_helper(QemuOpts *opts, const char *name,
     }

     opt = qemu_opt_find(opts, name);
- if (opt == NULL) {
+ if ((opt == NULL) || !opt->desc) {
         const QemuOptDesc *desc = find_desc_by_name(opts->list->desc, name);
         if (desc && desc->def_value_str) {
             parse_option_bool(name, desc->def_value_str, &ret, &error_abort);
--

Revision history for this message
chao zhou (chao-zhou) wrote :

test the patch with qemu.git commit ab0302ee764fd702465aef6d88612cdff4302809
 create guest with parameter "-usbdevice tablet" , the guest works fine.

Revision history for this message
chao zhou (chao-zhou) wrote :

kvm.git+ qemu.git:bab5bb39_64ea8038
kernel:3.19.0-rc3
create guest with parameter "-usbdevice tablet" , the guest works fine.

Changed in qemu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.