From nobody Fri Aug 18 07:41:53 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 4RRv2p0jcmz4qrFp; Fri, 18 Aug 2023 07:41:54 +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 4RRv2n5TPGz3GNF; Fri, 18 Aug 2023 07:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692344513; 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=ZDHPP3Hm9Lyads0aGYbxcwv8aT+KrTYTKlCJ0jfkQWU=; b=UxDhUr+DRAilMKXoqRZEl2OPuHDv0sOnXWJZ2a8anqJ+w8pcC1yLAEh+rgFg8/gXS37vtY eloSSnf1QYvlyP9+HQuFXUlpUHRcbQZf81xGnjwSc4Rfw778j3JixYBfrJ0wNL4bAJhNmN pYQpqIBl2+Tq+NonMUGhu76HQeUla+RYuuBz6s6Xh429II/oKK3Y6S/03doI7wFjv8AbrT KvBVsa4ZijeteONPFxBew1UWJ1niR1FGkaJQJPUBeP0EXgKnGiTSyRqXLdEvjcu9ef5baP 6MqHhuE8GejGAw6w+Ot3IGPZvvCmTyehSxXoBAyVwH/meLlbQn1dWyZoIKoq/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692344513; 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=ZDHPP3Hm9Lyads0aGYbxcwv8aT+KrTYTKlCJ0jfkQWU=; b=WnVYRMJoWWao4SF48JviFzfPWsAHU8MD5akzE37N/zGnHEOFskDsT4UVMtC6MNdqeenfj/ G7W1MU+LVVNAODQ9sQGmE15vtnk0QmWXny/fC3Xxx0WvEsnadygQ6SB9wlzcgIEfX92Eqf AS/5clnzXvVJFYxn9jXOQCP/GQMpxly43vimqSqrK3UJK3VtxqEz7byzcRIu1/Yj7lnvV9 kwlc8qtab9Ci6iwJsiwIw9BNIVgypEG8+rka9SIwvoUIzbigM+vexG6P6gvQVJI/rcvQ0U JGuDqSusqSH7MX/+yBGBsTn4MmYIoQDYD8oDD1IJGMYctG+yPMBDziR7agC+ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692344513; a=rsa-sha256; cv=none; b=h6r10Jo4zkFDWggtDN89XowH6wMB0drFYW7tDRuH4x8aeeEFJD8GivDSFAalNkuq5yHv3S Mi//ei7YP5RcCLdnaFmRuIDBg+sq7lUGsdmPAE3UztXCOP228AR1ZiDWrPzFAx4D2io7sO jzJDbjdm4C2MutqK1FbGNCAPoBhNJ+/Z/Ku5xk4AILeZlGU9zDr8DmWCWVj/DwhwhPCOS8 yrObDkWJmjQQTVlsAdiWAzIVuVDYyA1i6FjNYRjnylzsZzbpcuqCE9aYk2TjJwVwUrc14S mi7iEZHs8Mf4Sk2FFHq/qMyagt2xA5eRgVpXEfn1WjjkbeOqudJ++/+Wn+AZzg== 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 4RRv2n4b5lz179W; Fri, 18 Aug 2023 07:41:53 +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 37I7frVj066996; Fri, 18 Aug 2023 07:41:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37I7frnQ066993; Fri, 18 Aug 2023 07:41:53 GMT (envelope-from git) Date: Fri, 18 Aug 2023 07:41:53 GMT Message-Id: <202308180741.37I7frnQ066993@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: 50734f2ba36b - stable/13 - bhyve: pass address of OpRegion to the guest 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: 50734f2ba36bb79d8472a71e6bd0ebb5399786a8 Auto-Submitted: auto-generated The branch stable/13 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=50734f2ba36bb79d8472a71e6bd0ebb5399786a8 commit 50734f2ba36bb79d8472a71e6bd0ebb5399786a8 Author: Corvin Köhne AuthorDate: 2023-05-10 11:44:28 +0000 Commit: Corvin Köhne CommitDate: 2023-08-18 07:32:08 +0000 bhyve: pass address of OpRegion to the guest Don't allow access to the physical ASLS register. It contains a host address which is meaningless for the guest. Additionally, it allows the guest to safely rewrite this register. This is the last commit required for GVT-d. Nevertheless, it might not work due to missing firmware support. MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D26209 (cherry picked from commit 71fb2dcb0023d49fc048e1f7b610ad05bd2efc32) --- usr.sbin/bhyve/pci_gvt-d.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_gvt-d.c b/usr.sbin/bhyve/pci_gvt-d.c index 4616bc84d275..35c7f30dd292 100644 --- a/usr.sbin/bhyve/pci_gvt-d.c +++ b/usr.sbin/bhyve/pci_gvt-d.c @@ -256,7 +256,10 @@ gvt_d_setup_opregion(struct pci_devinst *const pi) memcpy(opregion->gva, opregion->hva, opregion->len); - return (0); + pci_set_cfgdata32(pi, PCIR_ASLS_CTL, opregion->gpa); + + return (set_pcir_handler(sc, PCIR_ASLS_CTL, 4, passthru_cfgread_emulate, + passthru_cfgwrite_emulate)); } static int