From nobody Fri Jun 16 06:14:20 2023 X-Original-To: dev-commits-src-main@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 4Qj84r4V2Pz4fGfK; Fri, 16 Jun 2023 06:14: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 4Qj84r3vwTz3qcd; Fri, 16 Jun 2023 06:14:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686896060; 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=Grofehpb/m4+jfOuVGH+Kzqj3YidguWyyHMaN6tdb/4=; b=jPW3LHzNdU/dt8DhM9azZgS2PGce+ysfqT+a2qChL5vUoUgr+wPNjXXQBbsEODx7u+/Ul8 XYjmWjhydaqUPlG3ME71KclX5O71YwASEMI1wfx59Q9XQc/EbinWL9ObPNNY3KskcARXNX m3RBCuBwZN2n1X7iGFRzNn0OK66fZmz2Im78RdY8mtvCuC1PRzdk86wnOa1ETgdEyOjvPW ++OLCYKJ08PPUS4ZLtXOgEJglJnc3J1DrdN5U4JquvsQjwbi6GU3Mq/oIiPbXmWpGg4fwz zTlTu3BaWtIMhJYQskmr5g0VR/CIiuEez/wEzRh4DUWWOy5r4uvdmsfjWZYw6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686896060; 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=Grofehpb/m4+jfOuVGH+Kzqj3YidguWyyHMaN6tdb/4=; b=DV6l/nyLgzpHEDyIFV26QeB7uP3GzBGr1Qe6WX6UQIWE9/9+0gPb54somHZXMN7Gv6Ozci TaghG/qFNo70qipiL3Yl15vR6ckzBYF5mwUTdltokUV89G3ZUezsiWrh2iDjLi14Cneich E2oUwCdoZtlwJBCtOb3kbAxzMknNH3yFlcwOpGjDhcmUdJE6TQ6/4dc6qAR/jDh4PDlUVo RNP+XiBVdCkZ+ylcMimM8Bxt0Ign5bCBnO1TOXpQ2lUqhRVlbBhNYx5AkJ1XrcBnbUZwye XpMC1ldoqRArknt5mLvrKvLh1RMLPhJXFx4FWsPS1emZtOL3YzfUoedCxh18JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686896060; a=rsa-sha256; cv=none; b=DccZJXgbFk7r2o36pv/JoyCRSpV9VQudCP/pJZeumBtlEIdova+l66EmCphlHExMlhGVtP om1mr6zU+94vAffH/FAfG7XoyI8QU36vsvla0aF3oI6tyFnhTSVwHzIsCXvyJsa7bwszre 9x5wtgJqQ9gXRhVyDoKb8ii8QXiolU/5bUkNTvk2cYZcopbarbx82k3srGb2zqpeTMm9vr JC2ylY5cCqhvLpllMWUayXDxNVukUSZT/bdsLstZgfJ4ySn+GgE6mKt8WYazRpvoibN1yk F8p2fj2VrRo4nxE+XyD82lZ8ML12zKanN3LdiVIlOAcoIHV+zNTwfqCoyax1zg== 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 4Qj84r2lh5zHGG; Fri, 16 Jun 2023 06:14:20 +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 35G6EKht035251; Fri, 16 Jun 2023 06:14:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35G6EKEg035250; Fri, 16 Jun 2023 06:14:20 GMT (envelope-from git) Date: Fri, 16 Jun 2023 06:14:20 GMT Message-Id: <202306160614.35G6EKEg035250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 71fb2dcb0023 - main - bhyve: pass address of OpRegion to the guest List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 71fb2dcb0023d49fc048e1f7b610ad05bd2efc32 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=71fb2dcb0023d49fc048e1f7b610ad05bd2efc32 commit 71fb2dcb0023d49fc048e1f7b610ad05bd2efc32 Author: Corvin Köhne AuthorDate: 2023-05-10 11:44:28 +0000 Commit: Corvin Köhne CommitDate: 2023-06-16 05:55:16 +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 --- 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