GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Hailey (hailey@hails.org)'s status on Monday, 29-Dec-2025 04:40:26 JST Hailey Hailey

    Why is USB pass-through to a VM often unreliable? Like specifically what is it about the protocol or implementations or whatever that makes it difficult to do?

    In conversation about 6 months ago from hails.org permalink
    • Embed this notice
      ✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Monday, 29-Dec-2025 04:40:19 JST ✧✦Catherine✦✧ ✧✦Catherine✦✧
      in reply to
      • Adrian Chadd <verified.png>

      @erikarn @hailey I don't believe there are any hubs with 3-to-2 TTs, do you have an example?

      In conversation about 6 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Monday, 29-Dec-2025 04:40:20 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to

      @hailey ie, depending upon if you plug in a USB-3, USB-2, or USB-1 device, your XHCI USB-3 controller may actually be speaking that itself, or it may be speaking USB-3 only and USB-2 / USB-1 via a translation hub that will handle translating USB-2/USB-1 to USB-3. (or USB-1 to USB-2 for EHCI.)

      So suddenly your device ID and topology can change based on the /type of device you plugged in/!

      In conversation about 6 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Monday, 29-Dec-2025 04:40:21 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to

      @hailey Now all the devices on a given controller kind of look like a LAN with automatically enumerated endpoint and device IDs. The USB controller doesn't REALLY care about all the devices its speaking to, it's just given a set of transfers to do to endpoints and when it issues the transfers it hopes to heck they're there.

      But like, when you plug in hubs, those are store and forward things. And these days doing USB2 or USB1 on a USB-3 port can actually end up with a "hub" doing translation!

      In conversation about 6 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Monday, 29-Dec-2025 04:40:22 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to

      @hailey Now, that means all the hub/port control between that controller and your device needs to be done by the host, then you need to basically proxy all of the USB transfers from the host to the guest.

      But there's no standardised "paravirtualised USB" stuff. So the VM has to basically take your device, "fake" a USB controller and port, and then have those USB transfers to/from that particular device into the VM via this fake USB controller.

      In conversation about 6 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Monday, 29-Dec-2025 04:40:24 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to

      @hailey ok so

      at the top level, before usb-c, it's mostly easy to move the whole controller into the VM. That's a mostly self contained thing. It's doubly easy if it's behind an IO-MMU which virtualises all the DMA addressing.

      however, moving a USB device is problematic. All the hub and port control would be done by your host OS. You'd have to tell the host OS to pass something in by rule, eg "hey any mass storage device on this physical controller? please map to the VM."

      In conversation about 6 months ago permalink
    • Embed this notice
      Hailey (hailey@hails.org)'s status on Monday, 29-Dec-2025 04:40:25 JST Hailey Hailey
      in reply to
      • Adrian Chadd <verified.png>

      @erikarn yes please!

      In conversation about 6 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Monday, 29-Dec-2025 04:40:26 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to

      @hailey i kinda know? do you REALLY want to know? like really really REALLY really? :P

      In conversation about 6 months ago permalink
    • Embed this notice
      ✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Monday, 29-Dec-2025 05:15:42 JST ✧✦Catherine✦✧ ✧✦Catherine✦✧
      in reply to
      • Adrian Chadd <verified.png>

      @erikarn @hailey there *are* USB 3 TTs (VL670/671), you can't get them on the open market, I have the devboards and most devices don't work thru them due to rampant protocol violations they have

      In conversation about 6 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Monday, 29-Dec-2025 05:15:43 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to
      • ✧✦Catherine✦✧

      @whitequark @hailey I'll have to go dig to see if I misquoted and the USB-3 things are doing to 3 to 3 only and what they do when you plug a usb-3 hub into a usb-2 port.

      There /are/ weird shenanigans though!

      In conversation about 6 months ago permalink
    • Embed this notice
      ✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Monday, 29-Dec-2025 06:18:46 JST ✧✦Catherine✦✧ ✧✦Catherine✦✧
      in reply to
      • Adrian Chadd <verified.png>

      @erikarn anyway @hailey two things I'd like to add:
      1. is that USB is designed around the hardware responding in a fixed and very small amount of time to any request (this is also why until a few years ago, there were zero galvanic isolators for USB 2 high-speed, and musicians just suffered instead). virtualizing hardware that's so tightly based on meeting fixing timings is inherently fraught
      2. while there is usb-over-ip, in linux in particular the problem is that...

      In conversation about 6 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Monday, 29-Dec-2025 06:18:48 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to
      • ✧✦Catherine✦✧

      @whitequark @hailey oh /lord/ ew ;p

      In conversation about 6 months ago permalink
    • Embed this notice
      ✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Monday, 29-Dec-2025 06:19:47 JST ✧✦Catherine✦✧ ✧✦Catherine✦✧
      in reply to
      • Adrian Chadd <verified.png>

      @erikarn @hailey it exposes the "hardware" side of the *HCI drivers to "anything that can happen to packets on the network", which these drivers are suuuper not designed for, and they'll happily panic your kernel if something goes slightly wrong. I'm shocked that WSL's USB support is as stable as it is, must've taken a lot of work to get there

      In conversation about 6 months ago permalink
    • Embed this notice
      ✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Monday, 29-Dec-2025 06:52:37 JST ✧✦Catherine✦✧ ✧✦Catherine✦✧
      in reply to
      • Adrian Chadd <verified.png>

      @erikarn @hailey it's more complicated than that

      for the USB host case, you have a "VHCI", but the rest of the USB stack is still used basically as-is. it is fully and completely unprepared for the hardware to behave in unexpected ways, e.g. for packet loss

      In conversation about 6 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Monday, 29-Dec-2025 06:52:39 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to
      • ✧✦Catherine✦✧

      @whitequark @hailey also holy crap usb-over-ip in linux isn't virtualising the endpoints, but is .. exposing hardware? oh holy crap

      In conversation about 6 months ago permalink
    • Embed this notice
      Adrian Chadd <verified.png> (erikarn@mstdn.social)'s status on Monday, 29-Dec-2025 06:52:40 JST Adrian Chadd <verified.png> Adrian Chadd <verified.png>
      in reply to
      • ✧✦Catherine✦✧

      @whitequark @hailey oh yeah i forgot to mention how utterly bonkers the timing can be.

      It's not always the controller either. Like, you can submit a buffer for completion to the controller and context switch / copy it - this is what userland libusb + ugen devices do! - if you can do it to a process then you can do it to a VM! - but the devices themselves are also very latency sensitive and in a lot of cases shit the bed if your transfers aren't setup fast enough!

      In conversation about 6 months ago permalink

      Attachments


Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.