Discrete Device Assignment & PCI Express Bifurcation in the Hyper-V TV Server

This article discusses an issue with Hyper-V 2019 Discrete Device Assignment and hardware devices making use of PCI Express bifurcation.

 

The saga so far…

If you have not been following my series on creating a Virtualised IP TV Server in Hyper-V: In the last update I covered a redesign of the hardware necessitated by damage caused by the summer heat. The unfavourable environment of the attic had caused to a Tuner, USB Hub and USB Controller to fail. The redesign had brought all of the ‘consumer’ electronics down from the harsh environment of the attic and into the patch panel. This also allowed for the USB hub to be removed from the design.

I chose to use a higher quality, though unpowered USB controller to drive the new setup. At the time it worked. Fast forward a few months and the TV Mosaic installation became unstable. It could no longer play back from all three tuners at the same time.

 

Diagnosing the problem

After rotating the three tuners around between different ports. It was clear that they all worked correctly, but only reliably with two connected. Adding the third caused intermittent problems. Unlike when the controller failed, Windows (and TV Mosaic) was having no issues with device drivers. The most likely cause of the problem was that the 4 port, 2A USB controller could not supply enough power. In theory it should have, but the evidence would suggest otherwise.

After running it stably for 3 weeks with just 2 tuners. I decided that the USB Controller needed to be replaced.

 

A new USB Controller

Finding a 4 port, powered USB 3.0 controller running on a NEC/Renesas chip proved difficult. It was not a combination that I could find online. My options were therefore to:

  1. Purchase a second unpowered controller and not run more than 2 devices on each (£17)
  2. Buy two 2 port powered controllers (£35)
  3. Get a higher end server controller (£100+)

I chose option 3.

As I was spending the money, I looked at going all out investing in a USB 3.1 controller. Unfortunately, I wanted 4 Type A ports + USB C for future growth and the best that I could find was 3x Type A + USB C.

Going back to USB 3.0. StarTech had the dual channel (£105) and the quad channel (£125).

I found a good deal on the former and threw it into the server. It immediately didn’t work…

 

The Error

On booting the host VM, device manager would display inconsistent warnings.

Device Manager Warning

Between reboots, sometimes both Renesas devices would appear. Occasionally one or both would be in error (Code 43).

Windows has stopped this device because it has reported problems. (Code 43)

The device event logs would state the following, respectively:

Device PCI\VEN_1912&DEV_0015&SUBSYS_00151912&REV_02\5&3363a0c2&0&0 was not migrated due to partial or ambiguous match.

Last Device Instance Id: USB\VID_1A40&PID_0101\8&11254731&1&4
Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
Location Path: 
Migration Rank: 0xF000FFFFFFFFF122
Present: false
Status: 0xC0000719

Device PCI\VEN_1912&DEV_0015&SUBSYS_00151912&REV_02\5&1e98fe12&0&0 was not migrated due to partial or ambiguous match.

Last Device Instance Id: USB\VID_1A40&PID_0101\8&11254731&1&4
Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
Location Path: 
Migration Rank: 0xF000FFFFFFFFF122
Present: false
Status: 0xC0000719

At all times there would be either both USB Root Hubs present or one missing entirely. But the USB Root Hub would always be in error Code 10.

This device cannot start. (Code 10)

{Operation Failed}
The requested operation was unsuccessful.

Similarly, its device event log would state the following:

Device USB\ROOT_HUB30\6&1f474788&0&0 had a problem starting.

Driver Name: usbhub3.inf
Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
Service: USBHUB3
Lower Filters: 
Upper Filters: 
Problem: 0xA
Problem Status: 0xC0000001

The system could not detect any device plugged into any of the 4 USB ports.

Returning the unpowered controller to the VM fixed the problem immediately. There was however no issue with connecting devices and using the controller natively on the parent partition. So the issue wasn’t with the card.

 

Discrete Device Access & Bifurcation

I believe that the problem is being caused by PCI Express Bifurcation. StarTech give a clue to this in the name of the product.

The is a “4 Port PCI Express (PCIe) SuperSpeed USB 3.0 Card Adapter w/ 2 Dedicated 5Gbps Channels – UASP – SATA / LP4 Power” while the is a “4 Port PCI Express (PCIe) SuperSpeed USB 3.0 Card Adapter w/ 4 Dedicated 5Gbps Channels – UASP – SATA / LP4 Power”.

The former card takes its 4 USB ports and passes two of them down one 5Gbps “channel”. While the other two go down the second channel. The PEXUSB3S44V however gives 5Gbps to each USB port. StarTech achieve this using Bifurcation.

In simple terms. PCIe Bifurcation is the process of taking a physical PCIe slot and splitting it. For example, a 16x slot could be split into two 8x’s. This allows two different 8x devices to exist concurrently in the same slot. Bifurcation allows StarTech to build the PEXUSB3S42V as 2x USB controllers each with 2 ports. While the physical card for the PEXUSB3S44V is effectively equipped with 4x 1 port controllers.

This logical separation is fairly common, especially in SAS and SATA controllers. It should be noted that bifurcation can be used on entirely different physical cards. They devices do not have to be part of the same circuit board (they are tricky to mount however!).

From my testing. It would appear that Hyper-V Server 2019 / Windows Server 2019 Discrete Device Assignment (DDA) is incompatible with bifurcated devices. Something that is worth keeping in mind if you are yourself experimenting with DDA.

 

StarTech do have a less impressive, powered, single channel, Renesas 4-port card in the form of the . I confess that I missed this first time around. So stay tuned for discussion on the PEXUSB3S4V in the next part in the series.