From nobody Fri Aug 18 07:41:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RRv2b4rkmz4qrNm; Fri, 18 Aug 2023 07:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RRv2b40d0z3FkB; Fri, 18 Aug 2023 07:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692344503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c5fOY8mgMLkxXhFnSbXMWiICihaN+Vx47XYnXHt5IxQ=; b=sa6uG1xYg+I+Vw0fKvksArdKoSEfCyT6kFbk0M33PS8mK/ZshkEUzWqi3KkD5/AP7qL/qe C+EJE8B2tf+xvNTKdCLHLpSgHrmLeguqgapwXA0/oe2u3E/TasFt4qWzog/BV9rBp82a8k VyEXOBQqwmqsAqN/JUGTv5jSU/pRU23E6fZGwkXL+rNHg/oh1Kq1EaBJBMICHyB0gMJ3ae 4VPxeojZAGi/zNm7cn5WKUANw/FOKrXIfB73lMQ4Wd0gGSzEM1gq2fK/iOYzjuev1DJzwq /qfq1/8a0kFYqw/IYeg3gKvqPArNFDLFYssZ+M6HO1CFSaQAD/9+Cts/CAx0dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692344503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c5fOY8mgMLkxXhFnSbXMWiICihaN+Vx47XYnXHt5IxQ=; b=CGjNvlIMtG2jShzSENt1YILW9UoLHzokvc0Rtl39h2OYMqHKKIQ45mD4LIIQGtFBgyyq1G anjJbBAC6ILCTw6GC8vtVBNdRthqeWdl/4l7BsJ+cAeEBy3KNYsPzde7BQC+g3fAwN01jF BtSr1MaVWH8CuLVTdXNFMGZVtT4meDLpxY0i6+8EkwvM0bFuW+eqQQBWug+2h7WGfkaJGc AF1c9MQChI7BXc/8p4RihXs0+hJjvlxnjio3Nt+gSbR9fS4GpGjc2m/cUKVgjTkmW4yra8 /AOTFRudZqucwd29JHNcD1WJ9bjQcVLUoeumrSRnbe/nS9wISOPuoLZCP8v0FQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692344503; a=rsa-sha256; cv=none; b=AGmDLk3lkYsdTt/j+ks2XILns8nAwAVUh26Y5tfyEUgzytk54gXadLUHKw8KrmrJ8oCDvT PVkmjeGAbTr7cFsfRVZ+M6kv4qYlkdS2xZaDugnH3Gvb39iQpJDsKY/TzntG2pIWj5N9co c/2dIRWkOqR92oUfneDmnpv8xaJyN0lejGdpk8jkqoR5Dkjnsr3p9/MxnX5WOnDY3yXUex 1jgYzQm7WR61YH5dfkja3E5YcgN7q2hPd8cENfV5qmB1EhRdA0+GlwayhQcuk2sOXFYnxG 9Za1Rj5FNLiQHVxTvpPRZ+UFVUVJ85pOvHvPdjq0GgsvkE8d3Y79vmifGeudag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RRv2b33tdz16tD; Fri, 18 Aug 2023 07:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37I7fhJD065700; Fri, 18 Aug 2023 07:41:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37I7fhhR065697; Fri, 18 Aug 2023 07:41:43 GMT (envelope-from git) Date: Fri, 18 Aug 2023 07:41:43 GMT Message-Id: <202308180741.37I7fhhR065697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 194d65b5f860 - stable/13 - bhyve: make passthru sel public available List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 194d65b5f86024a0d0e63b16710b0d04c74ad250 Auto-Submitted: auto-generated The branch stable/13 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=194d65b5f86024a0d0e63b16710b0d04c74ad250 commit 194d65b5f86024a0d0e63b16710b0d04c74ad250 Author: Corvin Köhne AuthorDate: 2023-05-10 10:19:49 +0000 Commit: Corvin Köhne 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);