From nobody Sun Aug 14 18:18:29 2022 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 4M5Qdd2Bgdz4Ybmy; Sun, 14 Aug 2022 18:18:29 +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 4M5Qdd1fHsz472p; Sun, 14 Aug 2022 18:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660501109; 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=mxsJHvB4AcxK/UO9Rsu7lKa8Zs/BmxvrDh0aoIyK6N4=; b=SDUR2uV6qOCm9fxKuno4oUQlX0OxsMu4rU9MiGSKhy175dNP/AumHA/Gjtz56nvs+WpCm4 ra9gu8MdtyzWNG5pD2tGaVzTlIbpN+8WY9YchVqpnfA2vbtF7DoSGF5IRZlAJ8pRyV1mh/ iDDbd5X+JnEEnZUr71TaViRZLbQgm0k2/gv/qbJ2aKyCyF29X70zr8k54l7xUCWV2c0F/B KwumQG6+FYQZZ6tsQ6YYnaXITqd5XzVzvUqRcN5qFgd42hCyNkMtn8dq3gAAtg0U9bd188 XDwN3o6S64u2FQLvUIFHeVgDNCCvDOvUQNu1CW9T1stf/YmpeVYEUsnlTU8PXQ== 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 4M5Qdd0lGtz10rj; Sun, 14 Aug 2022 18:18:29 +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 27EIIT60045488; Sun, 14 Aug 2022 18:18:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27EIITa9045487; Sun, 14 Aug 2022 18:18:29 GMT (envelope-from git) Date: Sun, 14 Aug 2022 18:18:29 GMT Message-Id: <202208141818.27EIITa9045487@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Tuffli Subject: git: 3cae10048d27 - main - bhyve nvme: Fix Active Firmware Info 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: chuck X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cae10048d27f805d7fc909b123ddee34be0268e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660501109; 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=mxsJHvB4AcxK/UO9Rsu7lKa8Zs/BmxvrDh0aoIyK6N4=; b=oLwRRlCadT5mOmRugUbU08vuYt5YLzi7ZFZyENkYo7hWeX+5gVFR6KhRkanoJjzHByS2fY zzBIuApQJe1JEMqkb/dbVUkZanGQia4iv7owh9l8EOen0Z8tVdh8VlIia/cKZFuP4K1hfO m/78K2gfvWxBironULCXYke/2V1m7enJa7FpW2TgCaTuYOt/ti8AIt9ZAOh8ahTDDH7Poj JwBFzlv1gCK5hVW+S5lvKMCyqHjC6aFl0N3eR1YY899ftP30ftxVK0gKv9Z8qz/27EFZ9d NrRwxWFRL3FAoEIbxgtWkymAW3R2YRQkEdeWao0hyqi0MGABWWk3cWuO++QHgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660501109; a=rsa-sha256; cv=none; b=pDTLYWMSVNg7nJngVHvHTILnICh4yla38hpaerC8C4Ow4Eil6YeiyiRNHcJkTpm4Wr2ePd 0MHUkobzQXc4imkb0OXo7Yv23zoKkcxecfxch7sytYXEWqBT7KiaAtgXRZ4EsKorGybve7 jIJo91tK68rpg5FT+fsKSscVZ9tiIDsNt5lnnZ83tr+BuRySOcSJkBw40rbZ1W5ywN63u7 tqkXd+51buwRnddj0VpkhxIzww/b+WqtCy3EXZMNJ9UDRYCDJmu+WkjTr8ABfeA6Ys3Xbg Z2OsVdS2GV8YZNGYxjEffKZxqNFp9lQy44NCZbIbqzeWswCQx2JxBO+In+7WFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=3cae10048d27f805d7fc909b123ddee34be0268e commit 3cae10048d27f805d7fc909b123ddee34be0268e Author: WanpengQian AuthorDate: 2022-08-14 15:28:05 +0000 Commit: Chuck Tuffli CommitDate: 2022-08-14 16:59:36 +0000 bhyve nvme: Fix Active Firmware Info Summary: Currently Active Firmware Info is not initialized. Fix is to initialize the Active Firmware Info to Slot 1. Test Plan: Within FreeBSD/Linux guests, show the Firmware Logpage to confirm. Reviewed By: chuck MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32658 --- usr.sbin/bhyve/pci_nvme.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 93edd96a0d0d..afb5327ecd20 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -698,6 +698,11 @@ pci_nvme_init_logpages(struct pci_nvme_softc *sc) sc->health_log.temperature = NVME_TEMPERATURE; sc->health_log.available_spare = 100; sc->health_log.available_spare_threshold = 10; + + /* Set Active Firmware Info to slot 1 */ + sc->fw_log.afi = (1 << NVME_FIRMWARE_PAGE_AFI_SLOT_SHIFT); + memcpy(&sc->fw_log.revision[0], sc->ctrldata.fr, + sizeof(sc->fw_log.revision[0])); } static void