From nobody Mon Nov 14 08:25:59 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 4N9j7X1WMTz4hRSh; Mon, 14 Nov 2022 08:26:00 +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 4N9j7X0SbXz4cFk; Mon, 14 Nov 2022 08:26:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668414360; 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=e/KTIkpbiYSM5AZJ/FM8ch/0fxzt9oMOX2nmq+cQLTc=; b=uVYN272w93ZXO38KR3N6ak/u5sst+g11xKCaG97nUD1rVm13a/bFe9VKQ/DiWVx+zo8r11 lakiGUjGEXGGqoT0ymH++TMAkwO1D839C1GEU/Vc8osQMyPkXz/kOgFbpJ+FeKGB+TO2MT RyJaPIiNzQtFvHowz2L3SNP6bRmbTHWJaT7/1vZwntn1lHdqlRBAOk4OOJjHWgbNhWo6Ws 0EfJH2O39tDexBEwWRVDNDnIoljhZ9uJMclhF5dteNhfYurD+aSSKkOhGC8HZeFyNwiXky 8uH6x6wqqMUy+F4sfCeqYexGmUibHZsp30smUO4UyGRud1ml7ndcTLLLohGJfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668414360; 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=e/KTIkpbiYSM5AZJ/FM8ch/0fxzt9oMOX2nmq+cQLTc=; b=iZqDjFgavaw0qQE8vjOWoklxk7n+Nxyup8DSt2ZblG46RFDOshxduJBZodgTdjeXww7p4A MuJe9spJ07Xmasg+/OD8amzINJ/2QgMEiWTQ8+2KFIb+j4CUCTbhmhpRaTonDyywEmOcNv Ts9pCZdiYC8WdKBO6qvcbNC2Z3+DFTWLvThiD4qdWMiACT0ILrUz3AP9tWCkN/lENWAQGn o2jiQzkIRUcBdRRTnLtvX0rJni0K85zKjPFnR0/2ChzwDYycNddobdV9bq/aovZIaPDA9J 5Zb/3cZmc+/IOWSAxAGxgbeNA6W0QfrJSHd/Tlfebg+zf71w9QFT+oLwXZ690A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668414360; a=rsa-sha256; cv=none; b=fwbRhe82aJ/C0rogJM0548cObf4ulPxkFyl47wR8hA1Fncz4cVEogdVHBdjvL2LjwhU9Ug ++VSzUNPjLFCtNjEFOK2yz93iwjR4seWsHbObFUGeRLErxEoVVF5hjwoEnHpBGP4Dgew/n J3sFC3ShnCuvi+bpZZoq90qglUMemMEj/L1ytPyqD+iC1tgrVTQZedugxxDtkEFLYCVS9l IDfi2cgxIHf1ps7GJgBqWaz/zUyq695qIADltv1DfPwJ+UJ9r/0BIMOSb5yy/gwialGVW7 hFhGxdIEV5r3UuSY6pxHFwxCmikf+ltHwx2Dsjnrstx7GQkjbMVHdQ0f7CA/dw== 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 4N9j7W6dh2zZkR; Mon, 14 Nov 2022 08:25:59 +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 2AE8PxP3084365; Mon, 14 Nov 2022 08:25:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AE8PxOs084364; Mon, 14 Nov 2022 08:25:59 GMT (envelope-from git) Date: Mon, 14 Nov 2022 08:25:59 GMT Message-Id: <202211140825.2AE8PxOs084364@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: c3c15ed7fc2d - stable/13 - bhyve: initial PowerCycles value 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: c3c15ed7fc2d72e8b3ab20615691571d170c0f55 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=c3c15ed7fc2d72e8b3ab20615691571d170c0f55 commit c3c15ed7fc2d72e8b3ab20615691571d170c0f55 Author: Wanpeng Qian AuthorDate: 2022-11-04 07:48:00 +0000 Commit: Corvin Köhne CommitDate: 2022-11-14 08:23:12 +0000 bhyve: initial PowerCycles value Currently PowerCycles field of Log Page is 0 and it is an invalid value. This patch will initial the PowerCycles data to 1. MFC after: 1 week Approved by: manu (mentor) Reviewed By: grehan (older version), chuck, corvink Differential Revision: https://reviews.freebsd.org/D32558 (cherry picked from commit b631954ff07989b83378bf5cd1af5fad7162c9f9) --- usr.sbin/bhyve/pci_nvme.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 15d6ae777cc6..bc7b82bda619 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -681,6 +681,7 @@ pci_nvme_init_nsdata(struct pci_nvme_softc *sc, static void pci_nvme_init_logpages(struct pci_nvme_softc *sc) { + __uint128_t power_cycles = 1; memset(&sc->err_log, 0, sizeof(sc->err_log)); memset(&sc->health_log, 0, sizeof(sc->health_log)); @@ -700,6 +701,9 @@ pci_nvme_init_logpages(struct pci_nvme_softc *sc) 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])); + + memcpy(&sc->health_log.power_cycles, &power_cycles, + sizeof(sc->health_log.power_cycles)); } static void