From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUOAz-0003OP-Tq for qemu-devel@nongnu.org; Sun, 30 Mar 2014 18:26:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUOAu-0003Ou-Jx for qemu-devel@nongnu.org; Sun, 30 Mar 2014 18:26:01 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57475 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUOAu-0003Ol-9X for qemu-devel@nongnu.org; Sun, 30 Mar 2014 18:25:56 -0400 Message-ID: <533899F1.1030808@suse.de> Date: Mon, 31 Mar 2014 00:25:53 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <53387E35.3010909@redhat.com> In-Reply-To: <53387E35.3010909@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] 2.0 regression: loadvm assertion with ehci + tablet List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cole Robinson Cc: "Michael S. Tsirkin" , qemu-devel , Gerd Hoffmann Hi, Am 30.03.2014 22:27, schrieb Cole Robinson: > With git master, loadvm hits an assert failure if using ehci and usb ta= blet. > Steps to reproduce: >=20 > $ qemu-img create -f qcow2 foo.qcow2 10G > $ ./x86_64-softmmu/qemu-system-x86_64 \ > -enable-kvm -m 4096 \ > -device ich9-usb-ehci1,id=3Dusb,bus=3Dpci.0,addr=3D0x5.0x7 \ > -device > ich9-usb-uhci1,masterbus=3Dusb.0,firstport=3D0,bus=3Dpci.0,multifunctio= n=3Don,addr=3D0x5 \ > -device ich9-usb-uhci2,masterbus=3Dusb.0,firstport=3D2,bus=3Dpci.0,ad= dr=3D0x5.0x1 \ > -device ich9-usb-uhci3,masterbus=3Dusb.0,firstport=3D4,bus=3Dpci.0,ad= dr=3D0x5.0x2 \ > -device usb-tablet,id=3Dinput0 \ > -hda foo.qcow2 \ > -cdrom Fedora-20-x86_64-Live-Desktop.iso \ > -boot d -monitor stdio >=20 > > (qemu) savevm foo > (qemu) loadvm foo > qemu-system-x86_64: hw/pci/pci.c:250: pcibus_reset: Assertion > `bus->irq_count[i] =3D=3D 0' failed. >=20 > The relevant backtrace bits for the assertion: >=20 > #4 0x00007f8f7241971e in pcibus_reset (qbus=3D0x7f8f74082fd0) > at hw/pci/pci.c:250 > #5 0x00007f8f723bd36d in qbus_reset_one (bus=3D0x7f8f74082fd0, > opaque=3D) at hw/core/qdev.c:249 > #6 0x00007f8f723bec88 in qdev_walk_children (dev=3D0x7f8f73efb320, > pre_devfn=3D0x0, pre_busfn=3D0x0, post_devfn=3D0x7f8f723bf4f0 , > post_busfn=3D0x7f8f723bd320 , opaque=3D0x0) > at hw/core/qdev.c:403 > #7 0x00007f8f723bedb8 in qbus_walk_children (bus=3D0x7f8f740706e0, > pre_devfn=3D0x0, pre_busfn=3D0x0, post_devfn=3D0x7f8f723bf4f0 , > post_busfn=3D0x7f8f723bd320 , opaque=3D0x0) > at hw/core/qdev.c:369 > #8 0x00007f8f724f5c5d in qemu_devices_reset () at vl.c:1867 > #9 qemu_system_reset (report=3Dreport@entry=3Dfalse) at vl.c:1880 > #10 0x00007f8f7256dba2 in load_vmstate (name=3Dname@entry=3D0x7f8f7417a= 160 "foo") > at /home/crobinso/src/qemu/savevm.c:1098 >=20 > The 'cause' is this: >=20 > #0 ehci_detach (port=3D0x555556436968) at hw/usb/hcd-ehci.c:810 > #1 0x0000555555727b5e in usb_detach (port=3Dport@entry=3D0x55555643696= 8) > at hw/usb/core.c:49 > #2 0x0000555555736bf3 in ehci_reset (opaque=3D0x5555564364d8) > at hw/usb/hcd-ehci.c:941 > #3 0x00005555557e1fcd in qemu_devices_reset () at vl.c:1867 > #4 qemu_system_reset (report=3Dreport@entry=3Dfalse) at vl.c:1880 > #5 0x0000555555859f12 in load_vmstate (name=3Dname@entry=3D0x555556458= 210 "foo") > at /home/crobinso/src/qemu/savevm.c:1098 >=20 > ehci_reset calls usb_detach which sets pcibus->irq_count[3] =3D 1. pcib= us_reset > runs and hits the assertion. But I don't understand this stuff enough t= o > determine what's actually wrong here :) >=20 > I bisected the issue to: >=20 > commit 31b030d4abc5bea89c2b33b39d3b302836f6b6ee > Author: Andreas F=C3=A4rber > Date: Wed Sep 4 01:29:02 2013 +0200 >=20 > cputlb: Change tlb_flush_page() argument to CPUState >=20 > Signed-off-by: Andreas F=C3=A4rber >=20 > ...and then I double checked it since that sounds unrelated. Same resul= t. You are running into an unrelated migration bug: http://git.qemu.org/?p=3Dqemu.git;a=3Dcommit;h=3Dc01a71c1a56fa27f43449ff5= 9e5d03b2483658a2 Sorry about that. You'll need to patch -p1 the above commit on top of each git-bisect commit to find the actual breakage if the above commit is already bad (can't test right now). Cheers, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg