HomeFreeBSD

Emulate the Device ID and Vendor ID registers for VFs

Description

Emulate the Device ID and Vendor ID registers for VFs

The SR-IOV standard requires VFs to read all-ones when the VID
and DID registers are read. The VMM (hypervisor) is required to
emulate them instead. Make pci_read_config() do this emulation.

Change pci_user.c to use pci_read_config() to read config space
registers instead of going directly to the pcib so that the
emulated VID/DID registers work correctly on VFs. This is
required both for pciconf and bhyve PCI passthrough.

Differential Revision: https://reviews.freebsd.org/D77
Reviewed by: jhb
MFC after: 1 month
Sponsored by: Sandvine Inc.

Details

Provenance
rstoneAuthored on
Reviewer
jhb
Differential Revision
Restricted Differential Revision
Parents
rS279447: Implement interface to create SR-IOV Virtual Functions
Branches
Unknown
Tags
Unknown

Event Timeline