From nobody Fri Jan 14 14:20:43 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 A9247195DACC; Fri, 14 Jan 2022 14:20:44 +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 4Jb3P80p75z3M7q; Fri, 14 Jan 2022 14:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642170044; 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=4o8pZkbuIJQgUg364wXqiwPP+Su6zx3/vPUhUJ4P270=; b=EYXv2Ru5LgbSTTzgpGrAsLcc8p4sWIedCSzKqQTZFzyFRTz1V+GqW8Evc528v8GwNUzE79 1duDT/pptfrjHfHlzBCQlffI7b/3Jis+cPl/rquIAJToDdUrVFEw95rM1Y8bVloAW/eKFo DaGaErd1Xybc5uhzsBJWfRSBegkDyhYwWAd5bu9BoBuAahtq6SVg41PsxwOCDvCUwWhTOR LmYAZTgbjfhbiKwAn4TjRjfQIiuPVllYeBjGYzR3HpTRdatGsmMostJRyv5b2iq6mfDzko 3kYrf96h+MfipPMQdtq+Y5rfrIHMhpovBXrEAiCYolQE40lvNXjA+WVX1l/A+Q== 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 ADAEC153A3; Fri, 14 Jan 2022 14:20:43 +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 20EEKhHm088044; Fri, 14 Jan 2022 14:20:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20EEKhYQ088043; Fri, 14 Jan 2022 14:20:43 GMT (envelope-from git) Date: Fri, 14 Jan 2022 14:20:43 GMT Message-Id: <202201141420.20EEKhYQ088043@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 16bd6661a921 - stable/13 - bhyve: emulate reads of MSI-X capabilities for passthru devices 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 16bd6661a9212e3efded99988e7734a3c1177de2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642170044; 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=4o8pZkbuIJQgUg364wXqiwPP+Su6zx3/vPUhUJ4P270=; b=QkACjHzoMgGqKzurAx/n8urYanVfy9ePoZmcY61i3z6RLkuYpNKUwrpkdxwVdUFij87BfD MHe6TnoI5vsrx/H9zYmSwgohGMwHK0Kk0osE4mbUpUi8NdfDYVjdlqQEESZFZeD7O/958o 9XqVJ8gM75juhOzh6lYiFX2Q4wK4nX0lWniKgEVjSQMm4k/6++CLz2tKF+/vYMKNRKufmT 8KVqRigoX6Qzi3UnmbCnN4rgd3cgBzxW36Jdcws1cpaf65PQyfmzpqEWYnv3ATJqvZsNfy HMoPYzd3aBKUrE0hkLM5JS9LUR2q6B6LYgxntnZZlzczb7xig+XPQenGUlu+Yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642170044; a=rsa-sha256; cv=none; b=QExAKtPLJCezH5Eag+PtqafRPpnDL2Gvb8KTNYhb1HM2JO3tV5XRN4mQ3SVP+lI9Bme/cb 7KqbUz0FcpsLyOTX4fN9WLfG0eX/0N6cS7Zppk5iTEv0yUQqpgIrz6el2ir67bl8do9Tb9 MviftmqPuj/ytT+Vv5mOk+Y8xAmEhcYfRmMD2ugz31yWfIFEWkOrBJForYWBOkNOqYkJxR fh4IW0AldXb6y75aFPy/aYC0Nu0dQfqVYDXmcMHMmmMYrZC3TTv/p+Iu6PA3PulMpwqHk9 mPNOo8A7o19OXBO4aKN2UlhMnuKYfcPwX59rZHPbrtb8jGcu0tFrZXBPZZOigg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=16bd6661a9212e3efded99988e7734a3c1177de2 commit 16bd6661a9212e3efded99988e7734a3c1177de2 Author: Corvin Köhne AuthorDate: 2021-11-22 15:27:33 +0000 Commit: Emmanuel Vadot CommitDate: 2022-01-14 14:18:08 +0000 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 (cherry picked from commit fe66bcf9ff8623bf69a183c9eb8c5ce72cce7db6) --- usr.sbin/bhyve/pci_passthru.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 8c48f522562d..586a2da8aa05 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -759,7 +759,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