On 11/11/2016 06:51 AM, Michael S. Tsirkin wrote:
On Thu, Nov 10, 2016 at 03:48:28PM -0700, Alex Williamson wrote:
So I merge this tag to try to resolve it, now I get qemu segfaulting
bisected to:
commit a6d8372bc6764ee279b473d13ff4ecc8acb7a978
Author: Cao jin <caoj.f...@cn.fujitsu.com>
Date: Sat Nov 5 10:07:21 2016 +0800
hcd-xhci: check & correct param before using it
Here's the backtrace from this one:
#0 0x0000555555a99d90 in xhci_running (xhci=0x0) at hw/usb/hcd-xhci.c:824
#1 0x0000555555a9f092 in xhci_port_notify (port=0x7fffbfb39330, bits=131072)
at hw/usb/hcd-xhci.c:2870
#2 0x0000555555a9f221 in xhci_port_update (port=0x7fffbfb39330, is_detach=0)
at hw/usb/hcd-xhci.c:2905
#3 0x0000555555a9f435 in xhci_reset (dev=0x7fffbfb38010)
at hw/usb/hcd-xhci.c:2961
#4 0x0000555555984a2e in device_reset (dev=0x7fffbfb38010)
at hw/core/qdev.c:1145
#5 0x00005555559828db in qdev_reset_one (dev=0x7fffbfb38010, opaque=0x0)
at hw/core/qdev.c:295
#6 0x00005555559834df in qdev_walk_children (dev=0x7fffbfb38010, pre_devfn=0x0,
pre_busfn=0x0, post_devfn=0x5555559828bf <qdev_reset_one>, post_busfn=0x5555559828e2
<qbus_reset_one>, opaque=0x0) at hw/core/qdev.c:610
#7 0x000055555598763b in qbus_walk_children (bus=0x555556a40f30, pre_devfn=0x0,
pre_busfn=0x0, post_devfn=0x5555559828bf <qdev_reset_one>, post_busfn=0x5555559828e2
<qbus_reset_one>, opaque=0x0) at hw/core/bus.c:59
#8 0x00005555559834a3 in qdev_walk_children (dev=0x555556a3f220, pre_devfn=0x0,
pre_busfn=0x0, post_devfn=0x5555559828bf <qdev_reset_one>, post_busfn=0x5555559828e2
<qbus_reset_one>, opaque=0x0) at hw/core/qdev.c:602
#9 0x000055555598763b in qbus_walk_children (bus=0x5555568296c0, pre_devfn=0x0,
pre_busfn=0x0, post_devfn=0x5555559828bf <qdev_reset_one>, post_busfn=0x5555559828e2
<qbus_reset_one>, opaque=0x0) at hw/core/bus.c:59
#10 0x00005555559829f5 in qbus_reset_all (bus=0x5555568296c0)
at hw/core/qdev.c:321
#11 0x0000555555982a18 in qbus_reset_all_fn (opaque=0x5555568296c0)
at hw/core/qdev.c:327
#12 0x00005555558e76f0 in qemu_devices_reset () at vl.c:1765
#13 0x00005555558367ce in pc_machine_reset ()
at /net/gimli/home/alwillia/Work/qemu.git/hw/i386/pc.c:2181
#14 0x00005555558e778d in qemu_system_reset (report=false) at vl.c:1778
#15 0x00005555558ef44b in main (argc=50, argv=0x7fffffffdf48,
envp=0x7fffffffe0e0) at vl.c:4656
Here's a commandline sufficient to trigger it:
qemu-system-x86_64 -m 1G -nodefaults -no-user-config -display none -monitor
stdio -device nec-usb-xhci
So apparently that never got tested or something got mangled in the
commit. Thanks,
Alex
I think I'll drop this, this patchset was borderline useful anyway.
Really sorry for the issue, I moved usb_xhci_init() too far from its
original place, results in the segmentation fault.
Could I send new version of this patch to fix it right now?
--
Yours Sincerely,
Cao jin