Re: [Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-19 Thread gerd hoffmann
Hi, > > We don't copy any state. It is rather pointless, even for save/resume on > > the > > same machine we don't know what state the usb device has and whenever it is > > still in the state the guest has left it. > I have tried stop/cont a vm with host-usb device during coping large > files

Re: [Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-19 Thread linzhecheng
> -Original Message- > From: gerd hoffmann [mailto:kra...@redhat.com] > Sent: Friday, August 17, 2018 2:08 PM > To: CheneyLin > Cc: linzhecheng ; wangxin (U) > ; qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] [PATCH] usb-host: insert usb device into ho

Re: [Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-16 Thread gerd hoffmann
> > Why live-migrate to localhost? That is rather tricky due to both source > > and target qemu accessing host resources at the same time, and I guess > > this is the reason you are seeing the problems here. > Thanks for your reply, but I'm still confused about these issues: > 1. If local live mig

Re: [Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-16 Thread CheneyLin
> -原始邮件- > 发件人: "Gerd Hoffmann" > 发送时间: 2018-08-16 21:01:31 (星期四) > 收件人: linzhecheng > 抄送: "wangxin (U)" , "qemu-devel@nongnu.org" > > 主题: Re: [Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be > scaned &

Re: [Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-16 Thread Gerd Hoffmann
> > Hmm, needs_autoscan is a fixed property of the device (depending on > > configuration), it should not be switched on and off. > > > > What problem you are trying to solve? > I'm trying to live migrate a vm to local host, but found the host-usb device > was removed then. > Is it possible not t

Re: [Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-16 Thread linzhecheng
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Thursday, August 16, 2018 6:46 PM > To: linzhecheng > Cc: qemu-devel@nongnu.org; wangxin (U) > Subject: Re: [PATCH] usb-host: insert usb device into hostdevs to be scaned > > On Thu, Aug 16, 2018 at 05:43:56P

Re: [Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-16 Thread Gerd Hoffmann
On Thu, Aug 16, 2018 at 05:43:56PM +0800, linzhecheng wrote: > According to the comment of usb_host_post_load_bh, after removing the > usb device passed through, we will kick host to scan it again, but the > emulated > usb device is not added to global list hostdevs, so it can never be > discover

[Qemu-devel] [PATCH] usb-host: insert usb device into hostdevs to be scaned

2018-08-16 Thread linzhecheng
According to the comment of usb_host_post_load_bh, after removing the usb device passed through, we will kick host to scan it again, but the emulated usb device is not added to global list hostdevs, so it can never be discovered then. So just do it before usb_host_auto_check. What's more, it's fut