<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" dir="auto">
thanks a lot for your kindly explanation.</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" dir="auto">
<br>
</div>
<div id="ms-outlook-mobile-signature">
<div><br>
</div>
Get <a href="https://aka.ms/AAb9ysg">Outlook for Android</a></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Uri Lublin <uril@redhat.com><br>
<b>Sent:</b> Wednesday, February 16, 2022 10:39:40 PM<br>
<b>To:</b> Li, Zhijian/李 智坚 <lizhijian@fujitsu.com><br>
<b>Cc:</b> spice-devel <spice-devel@lists.freedesktop.org><br>
<b>Subject:</b> Re: [Spice-devel] usbredir doesn't hide/filter specific usb devices</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Feb 15, 2022 at 5:41 PM <a href="mailto:lizhijian@fujitsu.com" target="_blank">
lizhijian@fujitsu.com</a> <<a href="mailto:lizhijian@fujitsu.com" target="_blank">lizhijian@fujitsu.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255)">> The auto-redirect-filter only works for auto-redirected USB devices.</div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255)"><br>
</div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255)">may i know what "auto-redirected usb devices" mean here. what's auto-redirect-filter user case.</div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255)"><br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>USB devices that are being plugged in while the remote-viewer window is in focus.<br>
</div>
<div>Such USB devices are auto-redirect'ed to the guest, but go through the filter first.</div>
<div><br>
</div>
<div>Uri</div>
<div><br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255)"></div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255)"><br>
</div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255)"><br>
</div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255)"><span>> When a user is choosing a device from the menu, the filter does not apply.</span></div>
<div id="x_m_3220267789811850740gmail-m_8151785131361810437ms-outlook-mobile-signature" dir="auto">
<div><br>
</div>
<div dir="auto">any idea to hide specific host usb devices from guest by current scheme</div>
<div dir="auto"><br>
</div>
<div><br>
</div>
Get <a href="https://aka.ms/AAb9ysg" target="_blank">Outlook for Android</a></div>
<div id="x_m_3220267789811850740gmail-m_8151785131361810437id-f6a8d475-5dcb-48a4-9fd6-b9df2cd42998">
<div style="font-family:sans-serif; font-size:12.48pt; color:rgb(0,0,0)"><br>
</div>
<hr style="display:inline-block; width:98%">
<div id="x_m_3220267789811850740gmail-m_8151785131361810437divRplyFwdMsg"><b>发件人:</b> Uri Lublin <<a href="mailto:uril@redhat.com" target="_blank">uril@redhat.com</a>><br>
<b>发送时间:</b> 2022年2月15日星期二 22:50<br>
<b>收件人:</b> Li, Zhijian/李 智坚<br>
<b>抄送:</b> spice-devel<br>
<b>主题:</b> Re: [Spice-devel] usbredir doesn't hide/filter specific usb devices<br>
</div>
<br>
<div dir="ltr">
<div>Hi Zhijian,</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Feb 15, 2022 at 3:52 PM Li, Zhijian <<a href="mailto:lizhijian@cn.fujitsu.com" target="_blank">lizhijian@cn.fujitsu.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
Hi guys<br>
<br>
I intended to not allow redirecting some of my usb devices(HID) to the guest, i thought
<a href="https://www.spice-space.org/usbredir.html" rel="noreferrer" target="_blank">
https://www.spice-space.org/usbredir.html</a><br>
could help on this.<br>
<br>
My host has below usb devices<br>
<br>
lizj@FNSTPC:~/workspace/vgt/virt-viewer/src$ lsusb<br>
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br>
Bus 001 Device 006: ID 04d8:0b2a Microchip Technology, Inc.<br>
Bus 001 Device 021: ID 046d:c534 Logitech, Inc. Unifying Receiver<br>
Bus 001 Device 004: ID 0424:2137 Standard Microsystems Corp.<br>
Bus 001 Device 003: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS <br>
802.11n WLAN Adapter<br>
Bus 001 Device 002: ID 0bda:8771 Realtek Semiconductor Corp.<br>
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>
<br>
$ remote-viewer <br>
--spice-usbredir-auto-redirect-filter="-1,0x0bda,-1,-1,0" --spice-debug <br>
spice://localhost:5900<br>
</blockquote>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<br>
For testing, i just want to hide produce id 0x0bda from remote-viewer <br>
with above command line. But acutally<br>
<br>
i am still able to redirec both Realtek device to the guest through <br>
remote-viewer.<br>
<br>
So is there something with my usage ? Feel free to let me know if there <br>
is something wrong.<br>
</blockquote>
<div><br>
</div>
<div>The auto-redirect-filter only works for auto-redirected USB devices.</div>
<div>When a user is choosing a device from the menu, the filter does not apply.</div>
<div><br>
</div>
<div>Regards,</div>
<div dir="auto"> Uri.T<br>
</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<br>
Thanks<br>
<br>
Zhijian<br>
<br>
<br>
<br>
</blockquote>
</div>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>