Date: Fri, 18 Aug 2023 07:41:43 GMT From: Corvin =?utf-8?Q?K=C3=B6hne?= <corvink@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 194d65b5f860 - stable/13 - bhyve: make passthru sel public available Message-ID: <202308180741.37I7fhhR065697@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=194d65b5f86024a0d0e63b16710b0d04c74ad250 commit 194d65b5f86024a0d0e63b16710b0d04c74ad250 Author: Corvin Köhne <corvink@FreeBSD.org> AuthorDate: 2023-05-10 10:19:49 +0000 Commit: Corvin Köhne <corvink@FreeBSD.org> CommitDate: 2023-08-18 07:29:26 +0000 bhyve: make passthru sel public available The GVT-d emulation requires access to this selector to read from the device. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D40035 (cherry picked from commit 60793cee27993048864f60e3c19039386e4a4ab0) --- usr.sbin/bhyve/pci_passthru.c | 8 ++++++++ usr.sbin/bhyve/pci_passthru.h | 1 + 2 files changed, 9 insertions(+) diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 2475a574249c..10e77990c283 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -660,6 +660,14 @@ done: return (error); } +struct pcisel * +passthru_get_sel(struct passthru_softc *sc) +{ + assert(sc != NULL); + + return (&sc->psc_sel); +} + int set_pcir_handler(struct passthru_softc *sc, int reg, int len, cfgread_handler rhandler, cfgwrite_handler whandler) diff --git a/usr.sbin/bhyve/pci_passthru.h b/usr.sbin/bhyve/pci_passthru.h index d18839e116fa..9b9293cdba7b 100644 --- a/usr.sbin/bhyve/pci_passthru.h +++ b/usr.sbin/bhyve/pci_passthru.h @@ -24,5 +24,6 @@ int passthru_cfgread_emulate(struct passthru_softc *sc, struct pci_devinst *pi, int coff, int bytes, uint32_t *rv); int passthru_cfgwrite_emulate(struct passthru_softc *sc, struct pci_devinst *pi, int coff, int bytes, uint32_t val); +struct pcisel *passthru_get_sel(struct passthru_softc *sc); int set_pcir_handler(struct passthru_softc *sc, int reg, int len, cfgread_handler rhandler, cfgwrite_handler whandler);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308180741.37I7fhhR065697>