On 2015/3/18 16:23, Gerd Hoffmann wrote: > On Mi, 2015-03-18 at 09:49 +0800, arei.gong...@huawei.com wrote: >> From: Gonglei <arei.gong...@huawei.com> >> >> When hot-unplugging the usb controllers (ehci/uhci), >> we have to clean all resouce of these devices, >> involved registered reset handler. Otherwise, it >> may cause NULL pointer access and/or segmentation fault >> if we reboot the guest os after hot-unplugging. >> >> Let's hook up reset via DeviceClass->reset() and drop >> the qemu_register_reset() call. Then Qemu will register >> and unregister the reset handler automatically. > > Fails "make check" (for aarch64). My guess is the sysbus variants lost > the reset hookup. > Actually, these fails were introduced by the follow patch:
commit c3cf77cb63b71618224129df41f114488e0f74e4 Author: David Gibson <da...@gibson.dropbear.id.au> Date: Wed Feb 18 16:01:01 2015 +1100 Make sysbus EHCI devices ARM only by default A number of ARM embedded boards include EHCI USB host controllers which appear as directly mapped devices, rather than sitting on a PCI bus. At present code to emulate such devices is included whenever EHCI support is included. This patch adjusts teh config options to only include them in builds targetting ARM by default. But on the other hand, the sysbus variants lost the reset hookup is a real bug, I will fix them in the next version. thanks! Regards, -Gonglei