From nobody Sat Jan 08 15:22:21 2022 X-Original-To: dev-commits-src-branches@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 2619B1942FD1; Sat, 8 Jan 2022 15:22:22 +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 4JWP313YB8z4cd6; Sat, 8 Jan 2022 15:22:21 +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 54EE0212F3; Sat, 8 Jan 2022 15:22:21 +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 208FMLp5000947; Sat, 8 Jan 2022 15:22:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 208FMLBj000946; Sat, 8 Jan 2022 15:22:21 GMT (envelope-from git) Date: Sat, 8 Jan 2022 15:22:21 GMT Message-Id: <202201081522.208FMLBj000946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: fa3cc60e6dcc - stable/13 - bhyve: Map the right BAR in init_msix_table() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: fa3cc60e6dccbffd136ffbb804c2606c401e1443 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641655341; 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=a8WolLFAoDB+mPWFwTrh3ECyyioAcZy/6v4Oyq+DeK4=; b=qHuMijSFfE/xIKYL+aP2q4GnBBtNm2ko/XkCZJY+MHYd7WDHdI5FzhiQtjoRysIag7kiNT q/LY6U5NuhuGu3/CCUQG2qW86O77nDJkb0LXDTllO6VZLNByMsovoANe8BCGObN4h0q8za ZhgkcxUQv9pc1gAcPR4d+tmUtGEWdac/413OYiEpEUfX6yWlkWfJmqsMytXZQhYKuxTWjI i7apVtZwVeFqFU7CUIeCnJiGCRGOsNiS+0HXlw1LgOC+TLVnBh79MLUcWWxSwynPtnezTJ pAjC/AMMA7wVNE4fES1WqQQziXX1Fb6NSX2twtcjXwYgqn/02YE4Hn82ftfLqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641655341; a=rsa-sha256; cv=none; b=bPvffjOWdL39S12jWVpBWZ7r6zb4bsx7H5+DzAQnJfpbCmWE3N7Z7mHxk1og+37z1kr7Vb ivtk4mTGux6AevFsxDuit2OGYNGkN+P2Ad9Tt6MrlAOTnhi0/cyVJMGzd9otL86o+KePip wlwGbry9rpIPCjfm34EgV86cfaPLs/OmgAkCf061qp3qgv+RRhvbtdzpBgrNk6ovhP66kb SMEH6Xo2uFyJVFEYF0DTjmW1x1eN9//xwskzbfn+DZL8mpqlDprm6Zgj3ERXMBaZ2dLzbJ SVGaU5Rs2+jaR7MFoLI3z9nyKJ0vi+LGlTwvuYGqTiZM2Yfk25q5gyNUo8nFBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fa3cc60e6dccbffd136ffbb804c2606c401e1443 commit fa3cc60e6dccbffd136ffbb804c2606c401e1443 Author: Mark Johnston AuthorDate: 2022-01-04 19:02:55 +0000 Commit: Mark Johnston CommitDate: 2022-01-08 15:22:08 +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") Sponsored by: The FreeBSD Foundation (cherry picked from commit 76b45e688ae84a701f52039c4d0abf8e21a3f59c) --- 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 313f73dc4df1..2e274829d783 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, uint64_t base) 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) {