PCI Passthrough does not work for Virtual Machine with Linux kernel 4.2 and above
search cancel

PCI Passthrough does not work for Virtual Machine with Linux kernel 4.2 and above

book

Article ID: 334342

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • The PCI Passthrough device does not work in a Linux Virtual Machine with kernel version 4.2 and above
  • In the vmware.log file, you see message similar to:
Enable MSIX with zero vector programmed, intr proxy will notbe set up, device:xxxx:xx:xx.x


Environment

VMware vSphere ESXi 5.5

Cause

Patches in https://lkml.org/lkml/2015/4/13/21 changed the way the Linux kernel programmed MSI-X vectors.

Older versions programs the MSI-X vector table before enabling MSI-X in the message control register but newer versions do the following:

  • Sets the MSI-X message control register to enabled + masked
  • Masks all vectors in the MSI-X table
  • Unmasks MSI-X via the message control register
  • Programs the vectors in the MSI-X table and unmasks them

This breaks the assumptions made by PCI passthru code - specifically PCIPassthruSetupInterrupt is only called when the guest touches the message control register and PCIPassthruChangeIntrSettings assumes that the message addresses have already been programmed.

Resolution

To resolve this issue:
  • Upgrade the affected ESXi host to 5.5 Patch 08 or later version.
  • Upgrade the affected ESXi host to ESXi 6.0 Patch 03 or later version.

    These versions fix the problem by making PCIPassthruMSIXRPCHandler handle this case by disabling MSI-X before the guest writes the vector table and re-enabling it afterwards if MSI-X is enabled through the message control register.


Additional Information

Impact/Risks:
ESXi host needs to be rebooted to apply the fix.