From nobody Wed Jan 5 15:12:18 2022 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 3D87A1926241; Wed, 5 Jan 2022 15:12:20 +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 4JTXyp5Zh6z4Z5j; Wed, 5 Jan 2022 15:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 962DF6826; Wed, 5 Jan 2022 15:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 205FCI7u023472; Wed, 5 Jan 2022 15:12:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 205FCIV9023471; Wed, 5 Jan 2022 15:12:18 GMT (envelope-from git) Date: Wed, 5 Jan 2022 15:12:18 GMT Message-Id: <202201051512.205FCIV9023471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 76b45e688ae8 - main - bhyve: Map the right BAR in init_msix_table() 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76b45e688ae84a701f52039c4d0abf8e21a3f59c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641395539; 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=HCYGaD4Ncjo6i8n7Jg28VN/t9qr7F1fQBclo19hlazU=; b=yPu6V1Ov7/W1iL5mLaFgDXYCXpTaSqVLdfTzTtOYzD30+e/Ft3/qg5rtdoVzb4RhzM3n9W yDGcY8/acsJa0sIkRn9vfwd6c4dH/IgSCXaXkbUjezJWGmTgbHlYSOKu4p7eT4NHyB7WDU 5FgmdQ5Sh+Hvms+ysXcf9i273DgTbYOhGhnHyKbi9FaQ1sMrqiBx/fK7/JAZiDRkN4j5uk ixmftk6G1MQkNUGw7uGKmGiIx2/OZBst/PwUQEq3+pdnPLOLhsw3FsLhc0Xpa0JgNSqO0y eBbhqGMyWUgFGsEsfOyoe8y0t2VdvBVRYqVs3yDK+D2O6faticeCkDE4Xx5myQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641395539; a=rsa-sha256; cv=none; b=j6SIMhxRZjfZHuxSlYDuo1gG1Z1XwPueVNgaEDc1hTsnMv1JsWxjCPb+qs5Yqp1bQy0N63 R4eTp06FxVlZgruFptuZSUIgC0pJMJyF7054XUJ7xqfO9+B7RM2umxXgQeYTJlePHdfX8F 0BPMGdxQWsqrfm3qFfNo/BwFXAZu2aXr0M5j+3Kk6pBkpEk4tmJrsyVuTxlb+iHrbMzd4q VOvyToDnhdy2bjffNBsQPXPFNp+ASlEKDEoloQQcbNuDs4sKPHNG32ZKV+jt6Ns+ujfWxA JL7Wx33wDv4bYLENTkSzR4u9IsyJGBiyMy75jD/2Z4h73pHuRE693opWJ1SzGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=76b45e688ae84a701f52039c4d0abf8e21a3f59c commit 76b45e688ae84a701f52039c4d0abf8e21a3f59c Author: Mark Johnston AuthorDate: 2022-01-04 19:02:55 +0000 Commit: Mark Johnston CommitDate: 2022-01-05 15:12:09 +0000 bhyve: Map the right BAR in init_msix_table() The PBA and MSI-X table can reside in different BARs. Reported by: Andy Fiddaman Reviewed by: jhb Fixes: 7fa233534736 ("bhyve: Map the MSI-X table unconditionally for passthrough") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33739 --- usr.sbin/bhyve/pci_passthru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index ea8a3a71c8b8..0d25a8d8143f 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -444,7 +444,7 @@ init_msix_table(struct vmctx *ctx, struct passthru_softc *sc) memset(&pbm, 0, sizeof(pbm)); pbm.pbm_sel = sc->psc_sel; pbm.pbm_flags = PCIIO_BAR_MMAP_RW; - pbm.pbm_reg = PCIR_BAR(pi->pi_msix.pba_bar); + pbm.pbm_reg = PCIR_BAR(pi->pi_msix.table_bar); pbm.pbm_memattr = VM_MEMATTR_DEVICE; if (ioctl(pcifd, PCIOCBARMMAP, &pbm) != 0) {