From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk6dq-0008Jv-Ao for qemu-devel@nongnu.org; Tue, 13 May 2014 02:56:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wk6dj-0007MZ-FD for qemu-devel@nongnu.org; Tue, 13 May 2014 02:56:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk6dj-0007MO-7x for qemu-devel@nongnu.org; Tue, 13 May 2014 02:56:39 -0400 Message-ID: <1399964186.7118.35.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Tue, 13 May 2014 08:56:26 +0200 In-Reply-To: <33183CC9F5247A488A2544077AF19020815E7FD4@SZXEMA503-MBS.china.huawei.com> References: <1399898994-17436-1-git-send-email-kraxel@redhat.com> <33183CC9F5247A488A2544077AF19020815E7FD4@SZXEMA503-MBS.china.huawei.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] xhci: child detach fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gonglei (Arei)" Cc: "qemu-devel@nongnu.org" Hi, > BTW, in usb_release_port(), the detached port should be insert > the head of bus->free list table. Because of the save/restore will > cause qemu crash, after hot plug/hot unplug multi times. For example, > save the port '2' to memory file, but when we restore it, the port will > be assign to '1' over again, which not match with the memory file, > and then crash qemu. If you want hotplug and live migration play well you have to explicitly assign devices ports, i.e. -device usb-host,port=2,$args Otherwise it will simply not work reliable. cheers, Gerd