bhyve: emulate reads of MSI-X capabilities for passthru devices

Reads of the MSI-X capabilites aren't emulated by passthru devices
yet. The guest will read the host MSI-X capabilites which could
cause issues.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D32686
Sponsored by:	Beckhoff Automation GmbH & Co. KG
This commit is contained in:
Corvin Köhne 2021-11-22 16:27:33 +01:00 committed by Emmanuel Vadot
parent 2eb2079554
commit fe66bcf9ff

View File

@ -744,7 +744,8 @@ passthru_cfgread(struct vmctx *ctx, int vcpu, struct pci_devinst *pi,
/*
* PCI BARs and MSI capability is emulated.
*/
if (bar_access(coff) || msicap_access(sc, coff))
if (bar_access(coff) || msicap_access(sc, coff) ||
msixcap_access(sc, coff))
return (-1);
#ifdef LEGACY_SUPPORT