aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorvin Köhne <CorvinK@beckhoff.com>2021-11-22 15:27:33 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2021-11-22 15:27:33 +0000
commitfe66bcf9ff8623bf69a183c9eb8c5ce72cce7db6 (patch)
tree8f1b3930230c1ff34b559e6791fab556e7da4dd7
parent2eb2079554f4d54c4283410b4ee1aca549b29616 (diff)
downloadsrc-fe66bcf9ff8623bf69a183c9eb8c5ce72cce7db6.tar.gz
src-fe66bcf9ff8623bf69a183c9eb8c5ce72cce7db6.zip
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
-rw-r--r--usr.sbin/bhyve/pci_passthru.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c
index ed5d880ea8d1..9ad19f440e37 100644
--- a/usr.sbin/bhyve/pci_passthru.c
+++ b/usr.sbin/bhyve/pci_passthru.c
@@ -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