bhyve: export funcs for read/write pci config
authorCorvin Köhne <CorvinK@beckhoff.com>
Thu, 10 Mar 2022 10:26:19 +0000 (11:26 +0100)
committerEmmanuel Vadot <manu@FreeBSD.org>
Thu, 10 Mar 2022 11:30:02 +0000 (12:30 +0100)
commit563fd2240e13cfb53f6e5d50e9d1dc738b7c441e
tree94a195f0eaf712da31eee2e8af2e57444f63fe96
parentb344de4d0d163cbd8bf88cb5d226c18fe96f488f
bhyve: export funcs for read/write pci config

Export functions for reading and writing the pci config space from passthru
device to be used by other devices.
This is required for lpc devices to set their vendor/device ids to their
physical values.
Otherwise, GPU passthrough for integrated Intel GPUs won't work properly.

Differential Revision: https://reviews.freebsd.org/D33769
Reviewed by: markj
Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC after: 1 month
usr.sbin/bhyve/pci_passthru.c
usr.sbin/bhyve/pci_passthru.h [new file with mode: 0644]