xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* USB-C 250GB SSD Passthrough fails to DomU Ubuntu
@ 2022-08-30  5:42 A Sudheer
  2022-08-30  8:04 ` A Sudheer
  0 siblings, 1 reply; 4+ messages in thread
From: A Sudheer @ 2022-08-30  5:42 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]

Hi All

On XEN-4.16 with Ubuntu 22.04 Dom0 and HVM-DomU, I tried to do a USB mass
storage device passthrough to DomU.
I followed the PVUSB method mentioned in
https://wiki.xenproject.org/wiki/Xen_USB_Passthrough.

I am able to do passthrough for USB 2.0 and 3.x version 32/64 GB mass
storage devices to DomU.
Passthrough failed for "SanDisk 250GB SSD USB-C, USB 3.1" with below error.
Able to access the SSD in Dom0.
Can someone help with what could be missing here.

*Commands used:*
host$ sudo xl usbctrl-attach vm1 version=3 ports=6
host$ sudo xl usbdev-attach vm1 hostbus=3 hostaddr=2

*Error Log in DomU*
VM1:~$ sudo dmesg
[  152.841566] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
[  152.867164] usb 2-1: New USB device found, idVendor=0781,
idProduct=558c, bcdDevice=10.12
[  152.867173] usb 2-1: New USB device strings: Mfr=2, Product=3,
SerialNumber=1
[  152.867177] usb 2-1: Product: Extreme SSD
[  152.867179] usb 2-1: Manufacturer: SanDisk
[  152.867182] usb 2-1: SerialNumber: 31393430475A343030363932
[  152.899103] *usb 2-1: USB controller 0000:00:04.0 does not support
streams, which are required by the UAS driver.*
[  152.899110] usb 2-1: Please try an other USB controller if you wish to
use UAS.
[  152.899113] usb-storage 2-1:1.0: USB Mass Storage device detected
[  152.902033] scsi host2: usb-storage 2-1:1.0
[  152.902174] usbcore: registered new interface driver usb-storage
[  152.908928] usbcore: registered new interface driver uas
[  174.933399] usb 2-1: reset SuperSpeed USB device number 2 using xhci_hcd

Thanks
Sudheer

[-- Attachment #2: Type: text/html, Size: 2730 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: USB-C 250GB SSD Passthrough fails to DomU Ubuntu
  2022-08-30  5:42 USB-C 250GB SSD Passthrough fails to DomU Ubuntu A Sudheer
@ 2022-08-30  8:04 ` A Sudheer
  2022-09-07 11:01   ` A Sudheer
  0 siblings, 1 reply; 4+ messages in thread
From: A Sudheer @ 2022-08-30  8:04 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 8951 bytes --]

Few more logs

From Dom0, did passthrough of two USB drives (32GB stick and 250GB USB SDD)
In DomU, 32GB driver got mounted but 250GB SSD fails to mount.
In DomU, "lsusb" shows both the drives but "usb-devices" shows only the
32GB drive.

*Dom0 log:*
amd@HOST:~$ sudo xl usb-list vm1
Devid  Type         BE  state usb-ver ports
0      devicemodel  0   0     3       15
  Port 1: Bus 003 Device 002
  Port 2: Bus 005 Device 002
  Port 3:
  Port 4:
  Port 5:
  Port 6:
  Port 7:
  Port 8:
  Port 9:
  Port 10:
  Port 11:
  Port 12:
  Port 13:
  Port 14:
  Port 15:
HOST:~$

*DomU Log:*
amd@VM1:~$ lsusb
Bus 003 Device 003: ID 0781:558c SanDisk Corp. Extreme Portable SSD
Bus 003 Device 002: ID 0781:5581 SanDisk Corp. Ultra
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
amd@VM1:~$

*amd@VM1:~$ usb-devices*

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev=05.18
S:  Manufacturer=Linux 5.18.0-4460-amd+ uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:01.2
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0627 ProdID=0001 Rev=00.00
S:  Manufacturer=QEMU
S:  Product=QEMU USB Tablet
S:  SerialNumber=42
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh=15
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=05.18
S:  Manufacturer=Linux 5.18.0-4460-amd+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:00:04.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh=15
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=05.18
S:  Manufacturer=Linux 5.18.0-4460-amd+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:00:04.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=0781 ProdID=5581 Rev=01.00
S:  Manufacturer= USB
*S:  Product= SanDisk 3.2Gen1*
S:
 SerialNumber=040143504c9a3bd4596082500826a11868845df4396ebc5cb2e33dd3071e3fd5505f000000000000000000003ca6a60b000d7c18815581071b2a7c33
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=896mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
amd@VM1:~$

*amd@VM1:~$ sudo dmesg <for 250GB USB-C SSD>*

[  247.071742] usb 3-2: new SuperSpeed USB device number 3 using xhci_hcd
[  247.097304] usb 3-2: New USB device found, idVendor=0781,
idProduct=558c, bcdDevice=10.12
[  247.097314] usb 3-2: New USB device strings: Mfr=2, Product=3,
SerialNumber=1
[  247.097318] usb 3-2: Product: Extreme SSD
[  247.097321] usb 3-2: Manufacturer: SanDisk
[  247.097323] usb 3-2: SerialNumber: 31393430475A343030363932
[  247.101909] usb 3-2: USB controller 0000:00:04.0 does not support
streams, which are required by the UAS driver.
[  247.101915] usb 3-2: Please try an other USB controller if you wish to
use UAS.
[  247.101918] usb-storage 3-2:1.0: USB Mass Storage device detected
[  247.102710] scsi host3: usb-storage 3-2:1.0
[  269.131522] usb 3-2: reset SuperSpeed USB device number 3 using xhci_hcd

*DomU dmesg log while adding USB controller and USB 32GB disk*

[   94.494852] pci 0000:00:04.0: [1033:0194] type 00 class 0x0c0330
[   94.496278] pci 0000:00:04.0: reg 0x10: [mem 0x00000000-0x00003fff 64bit]
[   94.502161] pci 0000:00:04.0: BAR 0: assigned [mem 0xf1800000-0xf1803fff
64bit]
[   94.502981] pci 0000:00:04.0: enabling device (0000 -> 0002)
[   94.504005] xen: --> pirq=24 -> irq=32 (gsi=32)
[   94.514634] xhci_hcd 0000:00:04.0: xHCI Host Controller
[   94.514650] xhci_hcd 0000:00:04.0: new USB bus registered, assigned bus
number 2
[   94.517840] xhci_hcd 0000:00:04.0: hcc params 0x00080001 hci version
0x100 quirks 0x0000000000000014
[   94.523559] usb usb2: New USB device found, idVendor=1d6b,
idProduct=0002, bcdDevice= 5.18
[   94.523571] usb usb2: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[   94.523575] usb usb2: Product: xHCI Host Controller
[   94.523579] usb usb2: Manufacturer: Linux 5.18.0-4460-amd+ xhci-hcd
[   94.523581] usb usb2: SerialNumber: 0000:00:04.0
[   94.523974] hub 2-0:1.0: USB hub found
[   94.524850] hub 2-0:1.0: 15 ports detected
[   94.529968] xhci_hcd 0000:00:04.0: xHCI Host Controller
[   94.529981] xhci_hcd 0000:00:04.0: new USB bus registered, assigned bus
number 3
[   94.529988] xhci_hcd 0000:00:04.0: Host supports USB 3.0 SuperSpeed
[   94.530354] usb usb3: We don't know the algorithms for LPM for this
host, disabling LPM.
[   94.530400] usb usb3: New USB device found, idVendor=1d6b,
idProduct=0003, bcdDevice= 5.18
[   94.530404] usb usb3: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[   94.530407] usb usb3: Product: xHCI Host Controller
[   94.530410] usb usb3: Manufacturer: Linux 5.18.0-4460-amd+ xhci-hcd
[   94.530412] usb usb3: SerialNumber: 0000:00:04.0
[   94.530653] hub 3-0:1.0: USB hub found
[   94.531482] hub 3-0:1.0: 15 ports detected
[  157.522609] usb 3-1: new SuperSpeed USB device number 2 using xhci_hcd
[  157.548225] usb 3-1: New USB device found, idVendor=0781,
idProduct=5581, bcdDevice= 1.00
[  157.548236] usb 3-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[  157.548239] usb 3-1: Product:  SanDisk 3.2Gen1
[  157.548242] usb 3-1: Manufacturer:  USB
[  157.548244] usb 3-1: SerialNumber:
040143504c9a3bd4596082500826a11868845df4396ebc5cb2e33dd3071e3fd5505f000000000000000000003ca6a60b000d7c18815581071b2a7c33
[  157.571419] usb-storage 3-1:1.0: USB Mass Storage device detected
[  157.571981] scsi host2: usb-storage 3-1:1.0
[  157.572125] usbcore: registered new interface driver usb-storage
[  157.577381] usbcore: registered new interface driver uas
[  158.581138] scsi 2:0:0:0: Direct-Access      USB      SanDisk 3.2Gen1
1.00 PQ: 0 ANSI: 6
[  158.581550] sd 2:0:0:0: Attached scsi generic sg0 type 0
[  158.584622] sd 2:0:0:0: [sda] 60088320 512-byte logical blocks: (30.8
GB/28.7 GiB)
[  158.590171] sd 2:0:0:0: [sda] Write Protect is off
[  158.590181] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
[  158.593387] sd 2:0:0:0: [sda] Write cache: disabled, read cache:
enabled, doesn't support DPO or FUA
[  158.614589]  sda: sda1
[  158.627564] sd 2:0:0:0: [sda] Attached SCSI removable disk


On Tue, Aug 30, 2022 at 11:12 AM A Sudheer <asr7247@gmail.com> wrote:

> Hi All
>
> On XEN-4.16 with Ubuntu 22.04 Dom0 and HVM-DomU, I tried to do a USB mass
> storage device passthrough to DomU.
> I followed the PVUSB method mentioned in
> https://wiki.xenproject.org/wiki/Xen_USB_Passthrough.
>
> I am able to do passthrough for USB 2.0 and 3.x version 32/64 GB mass
> storage devices to DomU.
> Passthrough failed for "SanDisk 250GB SSD USB-C, USB 3.1" with below
> error. Able to access the SSD in Dom0.
> Can someone help with what could be missing here.
>
> *Commands used:*
> host$ sudo xl usbctrl-attach vm1 version=3 ports=6
> host$ sudo xl usbdev-attach vm1 hostbus=3 hostaddr=2
>
> *Error Log in DomU*
> VM1:~$ sudo dmesg
> [  152.841566] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
> [  152.867164] usb 2-1: New USB device found, idVendor=0781,
> idProduct=558c, bcdDevice=10.12
> [  152.867173] usb 2-1: New USB device strings: Mfr=2, Product=3,
> SerialNumber=1
> [  152.867177] usb 2-1: Product: Extreme SSD
> [  152.867179] usb 2-1: Manufacturer: SanDisk
> [  152.867182] usb 2-1: SerialNumber: 31393430475A343030363932
> [  152.899103] *usb 2-1: USB controller 0000:00:04.0 does not support
> streams, which are required by the UAS driver.*
> [  152.899110] usb 2-1: Please try an other USB controller if you wish to
> use UAS.
> [  152.899113] usb-storage 2-1:1.0: USB Mass Storage device detected
> [  152.902033] scsi host2: usb-storage 2-1:1.0
> [  152.902174] usbcore: registered new interface driver usb-storage
> [  152.908928] usbcore: registered new interface driver uas
> [  174.933399] usb 2-1: reset SuperSpeed USB device number 2 using xhci_hcd
>
> Thanks
> Sudheer
>

[-- Attachment #2: Type: text/html, Size: 11219 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: USB-C 250GB SSD Passthrough fails to DomU Ubuntu
  2022-08-30  8:04 ` A Sudheer
@ 2022-09-07 11:01   ` A Sudheer
  2022-09-21  7:12     ` A Sudheer
  0 siblings, 1 reply; 4+ messages in thread
From: A Sudheer @ 2022-09-07 11:01 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 9572 bytes --]

Hi All,

Is anyone aware if this a general limitation of DomU Or is there a way to
convince DomU to expose USB host controllers with streams support ?

Thanks
Sudheer

On Tue, Aug 30, 2022 at 1:34 PM A Sudheer <asr7247@gmail.com> wrote:

> Few more logs
>
> From Dom0, did passthrough of two USB drives (32GB stick and 250GB USB SDD)
> In DomU, 32GB driver got mounted but 250GB SSD fails to mount.
> In DomU, "lsusb" shows both the drives but "usb-devices" shows only the
> 32GB drive.
>
> *Dom0 log:*
> amd@HOST:~$ sudo xl usb-list vm1
> Devid  Type         BE  state usb-ver ports
> 0      devicemodel  0   0     3       15
>   Port 1: Bus 003 Device 002
>   Port 2: Bus 005 Device 002
>   Port 3:
>   Port 4:
>   Port 5:
>   Port 6:
>   Port 7:
>   Port 8:
>   Port 9:
>   Port 10:
>   Port 11:
>   Port 12:
>   Port 13:
>   Port 14:
>   Port 15:
> HOST:~$
>
> *DomU Log:*
> amd@VM1:~$ lsusb
> Bus 003 Device 003: ID 0781:558c SanDisk Corp. Extreme Portable SSD
> Bus 003 Device 002: ID 0781:5581 SanDisk Corp. Ultra
> Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
> Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> amd@VM1:~$
>
> *amd@VM1:~$ usb-devices*
>
> T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
> D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=1d6b ProdID=0001 Rev=05.18
> S:  Manufacturer=Linux 5.18.0-4460-amd+ uhci_hcd
> S:  Product=UHCI Host Controller
> S:  SerialNumber=0000:00:01.2
> C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
>
> T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor=0627 ProdID=0001 Rev=00.00
> S:  Manufacturer=QEMU
> S:  Product=QEMU USB Tablet
> S:  SerialNumber=42
> C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
>
> T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh=15
> D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
> P:  Vendor=1d6b ProdID=0002 Rev=05.18
> S:  Manufacturer=Linux 5.18.0-4460-amd+ xhci-hcd
> S:  Product=xHCI Host Controller
> S:  SerialNumber=0000:00:04.0
> C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
>
> T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh=15
> D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
> P:  Vendor=1d6b ProdID=0003 Rev=05.18
> S:  Manufacturer=Linux 5.18.0-4460-amd+ xhci-hcd
> S:  Product=xHCI Host Controller
> S:  SerialNumber=0000:00:04.0
> C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
>
> T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
> D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
> P:  Vendor=0781 ProdID=5581 Rev=01.00
> S:  Manufacturer= USB
> *S:  Product= SanDisk 3.2Gen1*
> S:
>  SerialNumber=040143504c9a3bd4596082500826a11868845df4396ebc5cb2e33dd3071e3fd5505f000000000000000000003ca6a60b000d7c18815581071b2a7c33
> C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=896mA
> I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
> E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
> amd@VM1:~$
>
> *amd@VM1:~$ sudo dmesg <for 250GB USB-C SSD>*
>
> [  247.071742] usb 3-2: new SuperSpeed USB device number 3 using xhci_hcd
> [  247.097304] usb 3-2: New USB device found, idVendor=0781,
> idProduct=558c, bcdDevice=10.12
> [  247.097314] usb 3-2: New USB device strings: Mfr=2, Product=3,
> SerialNumber=1
> [  247.097318] usb 3-2: Product: Extreme SSD
> [  247.097321] usb 3-2: Manufacturer: SanDisk
> [  247.097323] usb 3-2: SerialNumber: 31393430475A343030363932
> [  247.101909] usb 3-2: USB controller 0000:00:04.0 does not support
> streams, which are required by the UAS driver.
> [  247.101915] usb 3-2: Please try an other USB controller if you wish to
> use UAS.
> [  247.101918] usb-storage 3-2:1.0: USB Mass Storage device detected
> [  247.102710] scsi host3: usb-storage 3-2:1.0
> [  269.131522] usb 3-2: reset SuperSpeed USB device number 3 using xhci_hcd
>
> *DomU dmesg log while adding USB controller and USB 32GB disk*
>
> [   94.494852] pci 0000:00:04.0: [1033:0194] type 00 class 0x0c0330
> [   94.496278] pci 0000:00:04.0: reg 0x10: [mem 0x00000000-0x00003fff
> 64bit]
> [   94.502161] pci 0000:00:04.0: BAR 0: assigned [mem
> 0xf1800000-0xf1803fff 64bit]
> [   94.502981] pci 0000:00:04.0: enabling device (0000 -> 0002)
> [   94.504005] xen: --> pirq=24 -> irq=32 (gsi=32)
> [   94.514634] xhci_hcd 0000:00:04.0: xHCI Host Controller
> [   94.514650] xhci_hcd 0000:00:04.0: new USB bus registered, assigned bus
> number 2
> [   94.517840] xhci_hcd 0000:00:04.0: hcc params 0x00080001 hci version
> 0x100 quirks 0x0000000000000014
> [   94.523559] usb usb2: New USB device found, idVendor=1d6b,
> idProduct=0002, bcdDevice= 5.18
> [   94.523571] usb usb2: New USB device strings: Mfr=3, Product=2,
> SerialNumber=1
> [   94.523575] usb usb2: Product: xHCI Host Controller
> [   94.523579] usb usb2: Manufacturer: Linux 5.18.0-4460-amd+ xhci-hcd
> [   94.523581] usb usb2: SerialNumber: 0000:00:04.0
> [   94.523974] hub 2-0:1.0: USB hub found
> [   94.524850] hub 2-0:1.0: 15 ports detected
> [   94.529968] xhci_hcd 0000:00:04.0: xHCI Host Controller
> [   94.529981] xhci_hcd 0000:00:04.0: new USB bus registered, assigned bus
> number 3
> [   94.529988] xhci_hcd 0000:00:04.0: Host supports USB 3.0 SuperSpeed
> [   94.530354] usb usb3: We don't know the algorithms for LPM for this
> host, disabling LPM.
> [   94.530400] usb usb3: New USB device found, idVendor=1d6b,
> idProduct=0003, bcdDevice= 5.18
> [   94.530404] usb usb3: New USB device strings: Mfr=3, Product=2,
> SerialNumber=1
> [   94.530407] usb usb3: Product: xHCI Host Controller
> [   94.530410] usb usb3: Manufacturer: Linux 5.18.0-4460-amd+ xhci-hcd
> [   94.530412] usb usb3: SerialNumber: 0000:00:04.0
> [   94.530653] hub 3-0:1.0: USB hub found
> [   94.531482] hub 3-0:1.0: 15 ports detected
> [  157.522609] usb 3-1: new SuperSpeed USB device number 2 using xhci_hcd
> [  157.548225] usb 3-1: New USB device found, idVendor=0781,
> idProduct=5581, bcdDevice= 1.00
> [  157.548236] usb 3-1: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [  157.548239] usb 3-1: Product:  SanDisk 3.2Gen1
> [  157.548242] usb 3-1: Manufacturer:  USB
> [  157.548244] usb 3-1: SerialNumber:
> 040143504c9a3bd4596082500826a11868845df4396ebc5cb2e33dd3071e3fd5505f000000000000000000003ca6a60b000d7c18815581071b2a7c33
> [  157.571419] usb-storage 3-1:1.0: USB Mass Storage device detected
> [  157.571981] scsi host2: usb-storage 3-1:1.0
> [  157.572125] usbcore: registered new interface driver usb-storage
> [  157.577381] usbcore: registered new interface driver uas
> [  158.581138] scsi 2:0:0:0: Direct-Access      USB      SanDisk 3.2Gen1
> 1.00 PQ: 0 ANSI: 6
> [  158.581550] sd 2:0:0:0: Attached scsi generic sg0 type 0
> [  158.584622] sd 2:0:0:0: [sda] 60088320 512-byte logical blocks: (30.8
> GB/28.7 GiB)
> [  158.590171] sd 2:0:0:0: [sda] Write Protect is off
> [  158.590181] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
> [  158.593387] sd 2:0:0:0: [sda] Write cache: disabled, read cache:
> enabled, doesn't support DPO or FUA
> [  158.614589]  sda: sda1
> [  158.627564] sd 2:0:0:0: [sda] Attached SCSI removable disk
>
>
> On Tue, Aug 30, 2022 at 11:12 AM A Sudheer <asr7247@gmail.com> wrote:
>
>> Hi All
>>
>> On XEN-4.16 with Ubuntu 22.04 Dom0 and HVM-DomU, I tried to do a USB mass
>> storage device passthrough to DomU.
>> I followed the PVUSB method mentioned in
>> https://wiki.xenproject.org/wiki/Xen_USB_Passthrough.
>>
>> I am able to do passthrough for USB 2.0 and 3.x version 32/64 GB mass
>> storage devices to DomU.
>> Passthrough failed for "SanDisk 250GB SSD USB-C, USB 3.1" with below
>> error. Able to access the SSD in Dom0.
>> Can someone help with what could be missing here.
>>
>> *Commands used:*
>> host$ sudo xl usbctrl-attach vm1 version=3 ports=6
>> host$ sudo xl usbdev-attach vm1 hostbus=3 hostaddr=2
>>
>> *Error Log in DomU*
>> VM1:~$ sudo dmesg
>> [  152.841566] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
>> [  152.867164] usb 2-1: New USB device found, idVendor=0781,
>> idProduct=558c, bcdDevice=10.12
>> [  152.867173] usb 2-1: New USB device strings: Mfr=2, Product=3,
>> SerialNumber=1
>> [  152.867177] usb 2-1: Product: Extreme SSD
>> [  152.867179] usb 2-1: Manufacturer: SanDisk
>> [  152.867182] usb 2-1: SerialNumber: 31393430475A343030363932
>> [  152.899103] *usb 2-1: USB controller 0000:00:04.0 does not support
>> streams, which are required by the UAS driver.*
>> [  152.899110] usb 2-1: Please try an other USB controller if you wish to
>> use UAS.
>> [  152.899113] usb-storage 2-1:1.0: USB Mass Storage device detected
>> [  152.902033] scsi host2: usb-storage 2-1:1.0
>> [  152.902174] usbcore: registered new interface driver usb-storage
>> [  152.908928] usbcore: registered new interface driver uas
>> [  174.933399] usb 2-1: reset SuperSpeed USB device number 2 using
>> xhci_hcd
>>
>> Thanks
>> Sudheer
>>
>

[-- Attachment #2: Type: text/html, Size: 11776 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: USB-C 250GB SSD Passthrough fails to DomU Ubuntu
  2022-09-07 11:01   ` A Sudheer
@ 2022-09-21  7:12     ` A Sudheer
  0 siblings, 0 replies; 4+ messages in thread
From: A Sudheer @ 2022-09-21  7:12 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 10314 bytes --]

Hi All

I tried in qemu-KVM and able to mount USBC 250GB SATA on to guest vm. Able
to add the hardware to VM from virt-manager.  In host, qemu_system_x86-6 4
is used.

But i am not able to mount in DomU when tried in xen setup. In Dom0,
qemu_system_i386 is used. Tried copying qemu-system-x86_64 to
qemu_system_i386. Still issue observed.

Anyone aware what could be missing in xen setup compared to KVM setup ?

Thanks
Sudheer

On Wed, Sep 7, 2022 at 4:31 PM A Sudheer <asr7247@gmail.com> wrote:

> Hi All,
>
> Is anyone aware if this a general limitation of DomU Or is there a way to
> convince DomU to expose USB host controllers with streams support ?
>
> Thanks
> Sudheer
>
> On Tue, Aug 30, 2022 at 1:34 PM A Sudheer <asr7247@gmail.com> wrote:
>
>> Few more logs
>>
>> From Dom0, did passthrough of two USB drives (32GB stick and 250GB USB
>> SDD)
>> In DomU, 32GB driver got mounted but 250GB SSD fails to mount.
>> In DomU, "lsusb" shows both the drives but "usb-devices" shows only the
>> 32GB drive.
>>
>> *Dom0 log:*
>> amd@HOST:~$ sudo xl usb-list vm1
>> Devid  Type         BE  state usb-ver ports
>> 0      devicemodel  0   0     3       15
>>   Port 1: Bus 003 Device 002
>>   Port 2: Bus 005 Device 002
>>   Port 3:
>>   Port 4:
>>   Port 5:
>>   Port 6:
>>   Port 7:
>>   Port 8:
>>   Port 9:
>>   Port 10:
>>   Port 11:
>>   Port 12:
>>   Port 13:
>>   Port 14:
>>   Port 15:
>> HOST:~$
>>
>> *DomU Log:*
>> amd@VM1:~$ lsusb
>> Bus 003 Device 003: ID 0781:558c SanDisk Corp. Extreme Portable SSD
>> Bus 003 Device 002: ID 0781:5581 SanDisk Corp. Ultra
>> Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB
>> Tablet
>> Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>> amd@VM1:~$
>>
>> *amd@VM1:~$ usb-devices*
>>
>> T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
>> D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
>> P:  Vendor=1d6b ProdID=0001 Rev=05.18
>> S:  Manufacturer=Linux 5.18.0-4460-amd+ uhci_hcd
>> S:  Product=UHCI Host Controller
>> S:  SerialNumber=0000:00:01.2
>> C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
>> I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
>> E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
>>
>> T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
>> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
>> P:  Vendor=0627 ProdID=0001 Rev=00.00
>> S:  Manufacturer=QEMU
>> S:  Product=QEMU USB Tablet
>> S:  SerialNumber=42
>> C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
>> I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
>> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
>>
>> T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh=15
>> D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
>> P:  Vendor=1d6b ProdID=0002 Rev=05.18
>> S:  Manufacturer=Linux 5.18.0-4460-amd+ xhci-hcd
>> S:  Product=xHCI Host Controller
>> S:  SerialNumber=0000:00:04.0
>> C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
>> I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
>> E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
>>
>> T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh=15
>> D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
>> P:  Vendor=1d6b ProdID=0003 Rev=05.18
>> S:  Manufacturer=Linux 5.18.0-4460-amd+ xhci-hcd
>> S:  Product=xHCI Host Controller
>> S:  SerialNumber=0000:00:04.0
>> C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
>> I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
>> E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
>>
>> T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
>> D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
>> P:  Vendor=0781 ProdID=5581 Rev=01.00
>> S:  Manufacturer= USB
>> *S:  Product= SanDisk 3.2Gen1*
>> S:
>>  SerialNumber=040143504c9a3bd4596082500826a11868845df4396ebc5cb2e33dd3071e3fd5505f000000000000000000003ca6a60b000d7c18815581071b2a7c33
>> C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=896mA
>> I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
>> E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
>> E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
>> amd@VM1:~$
>>
>> *amd@VM1:~$ sudo dmesg <for 250GB USB-C SSD>*
>>
>> [  247.071742] usb 3-2: new SuperSpeed USB device number 3 using xhci_hcd
>> [  247.097304] usb 3-2: New USB device found, idVendor=0781,
>> idProduct=558c, bcdDevice=10.12
>> [  247.097314] usb 3-2: New USB device strings: Mfr=2, Product=3,
>> SerialNumber=1
>> [  247.097318] usb 3-2: Product: Extreme SSD
>> [  247.097321] usb 3-2: Manufacturer: SanDisk
>> [  247.097323] usb 3-2: SerialNumber: 31393430475A343030363932
>> [  247.101909] usb 3-2: USB controller 0000:00:04.0 does not support
>> streams, which are required by the UAS driver.
>> [  247.101915] usb 3-2: Please try an other USB controller if you wish to
>> use UAS.
>> [  247.101918] usb-storage 3-2:1.0: USB Mass Storage device detected
>> [  247.102710] scsi host3: usb-storage 3-2:1.0
>> [  269.131522] usb 3-2: reset SuperSpeed USB device number 3 using
>> xhci_hcd
>>
>> *DomU dmesg log while adding USB controller and USB 32GB disk*
>>
>> [   94.494852] pci 0000:00:04.0: [1033:0194] type 00 class 0x0c0330
>> [   94.496278] pci 0000:00:04.0: reg 0x10: [mem 0x00000000-0x00003fff
>> 64bit]
>> [   94.502161] pci 0000:00:04.0: BAR 0: assigned [mem
>> 0xf1800000-0xf1803fff 64bit]
>> [   94.502981] pci 0000:00:04.0: enabling device (0000 -> 0002)
>> [   94.504005] xen: --> pirq=24 -> irq=32 (gsi=32)
>> [   94.514634] xhci_hcd 0000:00:04.0: xHCI Host Controller
>> [   94.514650] xhci_hcd 0000:00:04.0: new USB bus registered, assigned
>> bus number 2
>> [   94.517840] xhci_hcd 0000:00:04.0: hcc params 0x00080001 hci version
>> 0x100 quirks 0x0000000000000014
>> [   94.523559] usb usb2: New USB device found, idVendor=1d6b,
>> idProduct=0002, bcdDevice= 5.18
>> [   94.523571] usb usb2: New USB device strings: Mfr=3, Product=2,
>> SerialNumber=1
>> [   94.523575] usb usb2: Product: xHCI Host Controller
>> [   94.523579] usb usb2: Manufacturer: Linux 5.18.0-4460-amd+ xhci-hcd
>> [   94.523581] usb usb2: SerialNumber: 0000:00:04.0
>> [   94.523974] hub 2-0:1.0: USB hub found
>> [   94.524850] hub 2-0:1.0: 15 ports detected
>> [   94.529968] xhci_hcd 0000:00:04.0: xHCI Host Controller
>> [   94.529981] xhci_hcd 0000:00:04.0: new USB bus registered, assigned
>> bus number 3
>> [   94.529988] xhci_hcd 0000:00:04.0: Host supports USB 3.0 SuperSpeed
>> [   94.530354] usb usb3: We don't know the algorithms for LPM for this
>> host, disabling LPM.
>> [   94.530400] usb usb3: New USB device found, idVendor=1d6b,
>> idProduct=0003, bcdDevice= 5.18
>> [   94.530404] usb usb3: New USB device strings: Mfr=3, Product=2,
>> SerialNumber=1
>> [   94.530407] usb usb3: Product: xHCI Host Controller
>> [   94.530410] usb usb3: Manufacturer: Linux 5.18.0-4460-amd+ xhci-hcd
>> [   94.530412] usb usb3: SerialNumber: 0000:00:04.0
>> [   94.530653] hub 3-0:1.0: USB hub found
>> [   94.531482] hub 3-0:1.0: 15 ports detected
>> [  157.522609] usb 3-1: new SuperSpeed USB device number 2 using xhci_hcd
>> [  157.548225] usb 3-1: New USB device found, idVendor=0781,
>> idProduct=5581, bcdDevice= 1.00
>> [  157.548236] usb 3-1: New USB device strings: Mfr=1, Product=2,
>> SerialNumber=3
>> [  157.548239] usb 3-1: Product:  SanDisk 3.2Gen1
>> [  157.548242] usb 3-1: Manufacturer:  USB
>> [  157.548244] usb 3-1: SerialNumber:
>> 040143504c9a3bd4596082500826a11868845df4396ebc5cb2e33dd3071e3fd5505f000000000000000000003ca6a60b000d7c18815581071b2a7c33
>> [  157.571419] usb-storage 3-1:1.0: USB Mass Storage device detected
>> [  157.571981] scsi host2: usb-storage 3-1:1.0
>> [  157.572125] usbcore: registered new interface driver usb-storage
>> [  157.577381] usbcore: registered new interface driver uas
>> [  158.581138] scsi 2:0:0:0: Direct-Access      USB      SanDisk 3.2Gen1
>> 1.00 PQ: 0 ANSI: 6
>> [  158.581550] sd 2:0:0:0: Attached scsi generic sg0 type 0
>> [  158.584622] sd 2:0:0:0: [sda] 60088320 512-byte logical blocks: (30.8
>> GB/28.7 GiB)
>> [  158.590171] sd 2:0:0:0: [sda] Write Protect is off
>> [  158.590181] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
>> [  158.593387] sd 2:0:0:0: [sda] Write cache: disabled, read cache:
>> enabled, doesn't support DPO or FUA
>> [  158.614589]  sda: sda1
>> [  158.627564] sd 2:0:0:0: [sda] Attached SCSI removable disk
>>
>>
>> On Tue, Aug 30, 2022 at 11:12 AM A Sudheer <asr7247@gmail.com> wrote:
>>
>>> Hi All
>>>
>>> On XEN-4.16 with Ubuntu 22.04 Dom0 and HVM-DomU, I tried to do a USB
>>> mass storage device passthrough to DomU.
>>> I followed the PVUSB method mentioned in
>>> https://wiki.xenproject.org/wiki/Xen_USB_Passthrough.
>>>
>>> I am able to do passthrough for USB 2.0 and 3.x version 32/64 GB mass
>>> storage devices to DomU.
>>> Passthrough failed for "SanDisk 250GB SSD USB-C, USB 3.1" with below
>>> error. Able to access the SSD in Dom0.
>>> Can someone help with what could be missing here.
>>>
>>> *Commands used:*
>>> host$ sudo xl usbctrl-attach vm1 version=3 ports=6
>>> host$ sudo xl usbdev-attach vm1 hostbus=3 hostaddr=2
>>>
>>> *Error Log in DomU*
>>> VM1:~$ sudo dmesg
>>> [  152.841566] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
>>> [  152.867164] usb 2-1: New USB device found, idVendor=0781,
>>> idProduct=558c, bcdDevice=10.12
>>> [  152.867173] usb 2-1: New USB device strings: Mfr=2, Product=3,
>>> SerialNumber=1
>>> [  152.867177] usb 2-1: Product: Extreme SSD
>>> [  152.867179] usb 2-1: Manufacturer: SanDisk
>>> [  152.867182] usb 2-1: SerialNumber: 31393430475A343030363932
>>> [  152.899103] *usb 2-1: USB controller 0000:00:04.0 does not support
>>> streams, which are required by the UAS driver.*
>>> [  152.899110] usb 2-1: Please try an other USB controller if you wish
>>> to use UAS.
>>> [  152.899113] usb-storage 2-1:1.0: USB Mass Storage device detected
>>> [  152.902033] scsi host2: usb-storage 2-1:1.0
>>> [  152.902174] usbcore: registered new interface driver usb-storage
>>> [  152.908928] usbcore: registered new interface driver uas
>>> [  174.933399] usb 2-1: reset SuperSpeed USB device number 2 using
>>> xhci_hcd
>>>
>>> Thanks
>>> Sudheer
>>>
>>

[-- Attachment #2: Type: text/html, Size: 12676 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-21  7:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30  5:42 USB-C 250GB SSD Passthrough fails to DomU Ubuntu A Sudheer
2022-08-30  8:04 ` A Sudheer
2022-09-07 11:01   ` A Sudheer
2022-09-21  7:12     ` A Sudheer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).