freebsd-nq/usr.sbin/bhyve/pci_passthru.h
Corvin Köhne 563fd2240e 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
2022-03-10 12:30:02 +01:00

16 lines
374 B
C

/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2020 Beckhoff Automation GmbH & Co. KG
* Author: Corvin Köhne <c.koehne@beckhoff.com>
*/
#pragma once
#include <vmmapi.h>
#include "pci_emul.h"
uint32_t read_config(const struct pcisel *sel, long reg, int width);
void write_config(const struct pcisel *sel, long reg, int width, uint32_t data);