Re: [Qemu-devel] question with usb stick host pass-through do ejection in guest

2016-09-05 Thread Gonglei (Arei)
Hi Gerd,

Thank you very much for your reply, it's very useful!

Regards,
-Gonglei


> -Original Message-
> From: Gerd Hoffmann [mailto:kra...@redhat.com]
> Sent: Monday, September 05, 2016 4:58 PM
> To: wangxin (U)
> Cc: qemu-devel@nongnu.org; fuweiwei (C); Gonglei (Arei)
> Subject: Re: question with usb stick host pass-through do ejection in guest
> 
>   Hi,
> 
> > It appears that "eject" the stick in the guest may also actually eject it on
> > the host,
> 
> Yes, that is the case.
> 
> > which however, is not rational.
> 
> Why?  I see the same behavior on physical machines.  If I want to use a
> usb stick after ejecting it I have to unplug and re-plug it.
> 
> > Could you tell me the root cause
> > of the problem and some proposals to evade the scenario? Thanks.
> 
> Well, the guest owns the device.  When the guest sends a eject command
> it will be forwarded to the device like any other request issued by the
> guest ...
> 
> cheers,
>   Gerd



Re: [Qemu-devel] question with usb stick host pass-through do ejection in guest

2016-09-05 Thread Gerd Hoffmann
  Hi,

> It appears that "eject" the stick in the guest may also actually eject it on
> the host,

Yes, that is the case.

> which however, is not rational.

Why?  I see the same behavior on physical machines.  If I want to use a
usb stick after ejecting it I have to unplug and re-plug it.

> Could you tell me the root cause
> of the problem and some proposals to evade the scenario? Thanks.

Well, the guest owns the device.  When the guest sends a eject command
it will be forwarded to the device like any other request issued by the
guest ...

cheers,
  Gerd