From nobody Fri Jul 31 14:30:17 2026 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 4hBT4b16RZz6mvL4 for ; Fri, 31 Jul 2026 14:30:23 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hBT4Z5gPNz3gFX for ; Fri, 31 Jul 2026 14:30:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785508222; 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=SH7xw4eq+MECXY7uGfd1srMOnXp+Ab9W6Ius1EoYseU=; b=Mj4SF8Y6lxqtyeyCerLMdnF/X57H1qDLbNBbTvPUMmpEUO7CgPrCv9SoXyIsY/gPAbIGmv FrjHvuUnGb4YSUgsbKXA3/FfC8X8230iL23qODQ6GlPI2lThgME+iRVKYX/azsyCJwJL+x j7dBgFXdJGIXvt5osZjEylIXX1edgog4/+H9zAA/V//PRjD7NPV7zxw63CATu4YVde+43q GH6ZQv9hFPxGzXyGDbbbSw4hpcATht4us621kBQAS2Fhspo3/lnffh2wCj6m7jd45ysjc7 N4taOfLc4/8HQ3CnecPxVyBzTOK90+YuxqPO05uFNa330+IMWUARljjRN5XQQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785508222; a=rsa-sha256; cv=none; b=pQ5+YjYTZ87F91a+TR7ju41kFtaehK89M9L0oZxiQELMqcIKJjVN3eS9rQcNMAsuSezEoc 4zd01HBEcTZ+eEgjXkBTm4RRtfplQMa3jdpQTac4GfP2eNwWT0A0sPEJgbu2wKnmgXvgtX HKEixmTCof2aaNNo210Irs1cGyXKQ1svF3/X98S3+jF5UJWo+2fa1TojXlpjpeSACjFLuk hVKGsaqT0zBTjJX2yZk+zhfJXLAI3/8uYzJD5o16gKcZFXQD7DqnSc3On2hw3eJcZrP3YY ou6oaYX2YlYHHsErx34fNz7Z7AbtkEOZtB0NpAYSQ0tUZBSWrkChJgiGb9o5+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785508222; 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=SH7xw4eq+MECXY7uGfd1srMOnXp+Ab9W6Ius1EoYseU=; b=H89MK4i5ZcUU1Ffu/scF/bUBAC8W2dusgTAiZuPT0ovg7oGHOQf+WwRy/2pnYa/mGfucMW uC/hqnt0O6te0eEf1avbBKrGbFR9m6J4lH1K99Rb1WgHJzrKfgkXcYqpJ0Ri2WcNGyjBHg gg96mzD0oES8yfekkIZyptabmpE6fCu/eGpZc2HmVTKyo5xU2E50J4c2zxwYLciKSxD7o4 jeDjKurF/TbRrs/vyIhaEXjcbJ+p6gptONsqIJe+75tw2zMye22CI33gQbD5+IoJT/uLC0 vnku8Ki89/7dIO8JtCWKgYzinfDnjjHi7xC8jPynpqcxNB0Nn8ciW1VgTL25ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hBT4Z4XM7z13KH for ; Fri, 31 Jul 2026 14:30:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 203f1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 31 Jul 2026 14:30:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1c1a3646a1c8 - main - bhyve: tpm: Avoid printing a message when clearing the cancel bit 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 1c1a3646a1c86624e67a42636894fd1685386cf1 Auto-Submitted: auto-generated Date: Fri, 31 Jul 2026 14:30:17 +0000 Message-Id: <6a6cb179.203f1.35c691@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1c1a3646a1c86624e67a42636894fd1685386cf1 commit 1c1a3646a1c86624e67a42636894fd1685386cf1 Author: Mark Johnston AuthorDate: 2026-07-31 14:22:46 +0000 Commit: Mark Johnston CommitDate: 2026-07-31 14:22:51 +0000 bhyve: tpm: Avoid printing a message when clearing the cancel bit Some drivers do this routinely, e.g., FreeBSD's tpm20 does this every time it sends a command in tpmcrb_transmit(). This causes the console to fill up with messages. Instead, only print a warning if the cancel bit is set to one. Reviewed by: corvink MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52425 --- usr.sbin/bhyve/tpm_intf_crb.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/tpm_intf_crb.c b/usr.sbin/bhyve/tpm_intf_crb.c index d571e89bb5ae..7058b47733f3 100644 --- a/usr.sbin/bhyve/tpm_intf_crb.c +++ b/usr.sbin/bhyve/tpm_intf_crb.c @@ -371,11 +371,18 @@ tpm_crb_mem_handler(struct vcpu *vcpu __unused, const int dir, break; } case offsetof(struct tpm_crb_regs, ctrl_cancel): { - /* TODO: cancel the tpm command */ - warnx( - "%s: cancelling a TPM command is not implemented yet", - __func__); + union tpm_crb_reg_ctrl_cancel cancel; + + if ((size_t)size > sizeof(cancel)) + goto err_out; + tpm_crb_mmiocpy(&cancel, val, size); + if (cancel.cancel != 0) { + /* TODO: cancel the tpm command */ + warnx( + "%s: cancelling a TPM command is not implemented yet", + __func__); + } break; } case offsetof(struct tpm_crb_regs, int_enable):