bhyve: add config option to modify LPC IDs
The Intel GOP driver checks the LPC IDs to detect the platform it's
running on. The GOP driver only works on the platforms it's written for.
Maybe other Intel driver have the same behaviour. For that reason, we
should use the LPC IDs of the FreeBSD host for GPU passthrough to work
properly.
We don't know if setting different LPC IDs have any side effect.
Therefore, don't use the host LPC IDs by default on Intel system. Give
the user the opportunity to modify the LPC IDs.
Reviewed by: jhb
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D28280
(cherry picked from commit f4ceaff56ddaacc151df07d2d205a2d7fcb736a8)
bhyve: fix spelling mistake of pcireg option
The option is spelled "pcireg" not "pcir".
MFC after: 1 week
Fixes: f4ceaff56ddaacc151df07d2d205a2d7fcb736a8
Sponsored by: Beckhoff Automation GmbH & Co. KG
(cherry picked from commit c98d13fbf9c9b75a49e48789932cd1395c95e7bf)
bhyve: scan PCI device functions to find host LPC
At least on some AMD devices the host LPC bridge could be located as
seperate function of another PCI device.
Fixes: f4ceaff56ddaacc151df07d2d205a2d7fcb736a8
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39310
(cherry picked from commit d3e03d235e3133f79ff9e3879fd4ed61ace38d73)
bhyve: do not exit if LPC finds no host selector
The host selector is only required when the user likes to use the same
LPC device IDs as the physical LPC device. This is an uncommon use case.
For that reason, it makes no sense to exit when we don't find the host
selector.
Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39311
(cherry picked from commit 0d29d750b9a7188c435d3701b2183f4df15ac98b)