Bug 918035
| Summary: | core dump when setting 'intrs' (option of usb controller xhci) value is not power of 2, qemu should give friendly tip | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | FuXiangChun <xfu> |
| Component: | qemu-kvm | Assignee: | Gerd Hoffmann <kraxel> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 7.0 | CC: | acathrow, areis, hhuang, juzhang, michen, mrezanin, sluo, virt-maint |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-1.5.0-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 09:54:12 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Maybe upstream management prevent setting this option, but from qemu point of view, It shouldn't core dump, so I set this bug as low low fix planned for qemu 1.5. upstream commit c94a7c6979cafa7a71f32b35e0ff71ed00c61a89 Build in qemu-kvm-1.5.0-1.el7 Reproduce this issue on qemu-kvm-1.4.0-4.el7.x86_64.
host info:
3.10.0-0.rc7.64.el7.x86_64
qemu-kvm-1.4.0-4.el7.x86_64
guest info:
3.10.0-0.rc7.64.el7.x86_64
step:
e.g:# /usr/libexec/qemu-kvm -cpu SandyBridge -enable-kvm...-device nec-usb-xhci,id=xhci,bus=pci.0,addr=0x8,intrs=12
qemu-kvm: hw/pci/msi.c:174: msi_init: Assertion `!(nr_vectors & (nr_vectors - 1))' failed.
Aborted (core dumped)
(gdb) bt
#0 0x00007f8d4ba05a19 in raise () from /lib64/libc.so.6
#1 0x00007f8d4ba07128 in abort () from /lib64/libc.so.6
#2 0x00007f8d4b9fe986 in __assert_fail_base () from /lib64/libc.so.6
#3 0x00007f8d4b9fea32 in __assert_fail () from /lib64/libc.so.6
#4 0x00007f8d4ffd2656 in msi_init (dev=dev@entry=0x7f8d4052d010, offset=offset@entry=112 'p', nr_vectors=12,
msi64bit=msi64bit@entry=true, msi_per_vector_mask=msi_per_vector_mask@entry=false) at hw/pci/msi.c:174
#5 0x00007f8d500097bb in usb_xhci_initfn (dev=0x7f8d4052d010) at hw/usb/hcd-xhci.c:3160
#6 0x00007f8d4ffd67e4 in pci_qdev_init (qdev=0x7f8d4052d010) at hw/pci/pci.c:1640
#7 0x00007f8d4ffe4b6e in device_realize (dev=0x7f8d4052d010, err=0x7fffb698f0e0) at hw/qdev.c:175
#8 0x00007f8d4ffe6147 in device_set_realized (obj=0x7f8d4052d010, value=<optimized out>, err=0x7fffb698f1e0)
at hw/qdev.c:673
#9 0x00007f8d5005143e in property_set_bool (obj=0x7f8d4052d010, v=<optimized out>, opaque=0x7f8d52c050b0,
name=<optimized out>, errp=0x7fffb698f1e0) at qom/object.c:1222
#10 0x00007f8d50053b27 in object_property_set_qobject (obj=0x7f8d4052d010, value=<optimized out>,
name=0x7f8d501ce300 "realized", errp=0x7fffb698f1e0) at qom/qom-qobject.c:24
#11 0x00007f8d50052ac0 in object_property_set_bool (obj=obj@entry=0x7f8d4052d010, value=value@entry=true,
name=name@entry=0x7f8d501ce300 "realized", errp=errp@entry=0x7fffb698f1e0) at qom/object.c:765
#12 0x00007f8d4ffe520a in qdev_init (dev=dev@entry=0x7f8d4052d010) at hw/qdev.c:161
#13 0x00007f8d4ffe10c5 in qdev_device_add (opts=0x7f8d529291f0) at hw/qdev-monitor.c:494
#14 0x00007f8d500834a9 in device_init_func (opts=<optimized out>, opaque=<optimized out>) at vl.c:2283
#15 0x00007f8d501b340b in qemu_opts_foreach (list=<optimized out>, func=func@entry=0x7f8d50083490 <device_init_func>,
opaque=opaque@entry=0x0, abort_on_failure=abort_on_failure@entry=1) at util/qemu-option.c:1128
#16 0x00007f8d4ff318e5 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:4214
(gdb) q
Verify this issue on qemu-kvm-1.5.1-2.el7.x86_64, it can boot up successfully without any qemu core dump setting intrs=3,5,6,7,9,10,11,12....
host info:
3.10.0-0.rc7.64.el7.x86_64
qemu-kvm-1.5.1-2.el7.x86_64
guest info:
3.10.0-0.rc7.64.el7.x86_64
e.g:# /usr/libexec/qemu-kvm -cpu SandyBridge -enable-kvm...-device nec-usb-xhci,id=xhci,bus=pci.0,addr=0x8,intrs=12
Base on above, this issue has been fixed correctly. Set it to verified status, please correct me if any mistake.
Best Regards,
sluo
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |
Description of problem: Boot xhci controller with intrs option, qemu will core dump when setting intrs=3,5,6,7,9,10,11....(now power of 2) e.g: -device nec-usb-xhci,intrs=12 I go through source code,it seem work as design. If so, just hope qemu give a friendly tip, rather than core dump. key code(hw/msi.c): assert(!(nr_vectors & (nr_vectors - 1))); /* power of 2 */ Notes: since xhci is new usb controller in rhel7. and the upper tool libvirt maybe still cann't support it. so I am not sure this issue is a bug. Version-Release number of selected component (if applicable): # uname -r 3.8.0-0.37.el7.x86_64 #rpm -qa|grep qemu qemu-kvm-1.3.0-8.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Boot guest with -device nec-usb-xhci,intrs=12 2. 3. Actual results: (gdb) bt #0 0x00007ffff2afaba5 in raise () from /lib64/libc.so.6 #1 0x00007ffff2afc358 in abort () from /lib64/libc.so.6 #2 0x00007ffff2af3972 in __assert_fail_base () from /lib64/libc.so.6 #3 0x00007ffff2af3a22 in __assert_fail () from /lib64/libc.so.6 #4 0x00005555556955eb in msi_init (dev=dev@entry=0x7fffe4eed010, offset=offset@entry=112 'p', nr_vectors=12, msi64bit=msi64bit@entry=true, msi_per_vector_mask=msi_per_vector_mask@entry=false) at hw/msi.c:174 #5 0x00005555556db66b in usb_xhci_initfn (dev=0x7fffe4eed010) at hw/usb/hcd-xhci.c:3129 #6 0x000055555569c02a in pci_qdev_init (qdev=0x7fffe4eed010) at hw/pci.c:1631 #7 0x00005555556aed1f in qdev_init (dev=dev@entry=0x7fffe4eed010) at hw/qdev.c:155 #8 0x00005555556a9d29 in qdev_device_add (opts=0x5555564e4010) at hw/qdev-monitor.c:481 #9 0x000055555576de39 in device_init_func (opts=<optimized out>, opaque=<optimized out>) at vl.c:2052 #10 0x000055555572ae63 in qemu_opts_foreach (list=<optimized out>, func=func@entry=0x55555576de20 <device_init_func>, opaque=opaque@entry=0x0, abort_on_failure=abort_on_failure@entry=1) at qemu-option.c:1106 #11 0x00005555555d21e9 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:3885 Expected results: qemu can give a friendly error message Additional info: