From nobody Thu Mar 07 01:39:16 2024 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 4TqsR83qljz5CLtk; Thu, 7 Mar 2024 01:39:16 +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 4TqsR82xqzz4vcw; Thu, 7 Mar 2024 01:39:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709775556; 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=6+nvtojJmuNLbAtYqRVN0GUv+LemjshlZFb1MreUrzY=; b=jWJhL2IGMRm3P1qocPV7OD+UMxBI2Q7voivCHtTkwcxd+zfg5+TuMehTVSg5Q8is7eQVeM vBVO8ULdy6iXT5Ea2/IjiinuU92vfF7Wow7V34bEhYyLUUA/JwaDg3U7uKnMBlPT6lH/Gi AspArOTyn55Fvo4TkQxPAlM2gVuuil11B6tBwMmY5hsgEaFW6PSB1Y6TaA8slHz1zmlQzo x3/ZTZ9u6nX+zqRKt63jB+3repR5Bvdmf+VmAnZ4z5JU3cyNLtTRS4I/7pNqnpAVAw/77y 5nmxRi9IwPhJeV050bAmWyWZ+NsG8qeRhNNY6f6vgQNvNtyNVKcteFu7iwNFfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709775556; a=rsa-sha256; cv=none; b=uXxtu1fvWsbdtUl4LQatEXlVG9W0f+wv+J1rw1UexE7idTRdqf6SOjFzJrdqBJZu2f/nLx AyoNFQXf+mS5fX7DYWx37P2YcRiMgQvi1oiyO7ftN2rVFZztPW8IUeJTY5dJe74pPC30ei orvNYHPj5+VlB4ywjIbwdKprnlXLj3wtCm8D0sKk5p18QTud/OHrzXjLtncLlz9jTXhbYR v92uAd8KzzuPG8kJkPuFaElsL68xa7bZm+isb208s45gCaR95gLStvUNMZPXLKZdatKqPu i6Wbg8QYiNJlp5o6bmLK9OeaVLt5TlCoVGHAAYxm5xI5w+IJiUoPY+iwQ092Xg== 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=1709775556; 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=6+nvtojJmuNLbAtYqRVN0GUv+LemjshlZFb1MreUrzY=; b=bim1uR8fDi2iaXSJq7bikrSq+k/9okRBlkOdd/hqMn7czj3urMqGgSV6zLCwVT62OsjOEI d5qkEV53eAyuuDOl+2RHyLd+wzd37ugu9tvEujsyV5SiPEGEZz4F6baBgeVUeNpK6DRmpr dqmF/3kJfYYtoygQ2OzJwe/ITjzcSi4LyhLUD82tl+mfL7MZZ+99+AS7PxjEtaPdgj2/5q ayGsHX8r69TSgkkK4eB+vycW6VFis40wbmdRHpCU8eS2cM+rmnDlEo2nhHBOP4iF8Q2H67 oHTo6aCan6apRlbb0ebYG/6+CAjoQbIYoC4B585YW2r46+2mTexCsCTD9sVU6Q== 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 4TqsR82YgLzDcW; Thu, 7 Mar 2024 01:39:16 +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 4271dGfg057192; Thu, 7 Mar 2024 01:39:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4271dG4P057189; Thu, 7 Mar 2024 01:39:16 GMT (envelope-from git) Date: Thu, 7 Mar 2024 01:39:16 GMT Message-Id: <202403070139.4271dG4P057189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 2a2682ee5330 - main - nvme: Add SMART WARNING for persistent memory region 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a2682ee5330ec3803f349b85090577b2fd72987 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2a2682ee5330ec3803f349b85090577b2fd72987 commit 2a2682ee5330ec3803f349b85090577b2fd72987 Author: Warner Losh AuthorDate: 2024-03-07 01:22:44 +0000 Commit: Warner Losh CommitDate: 2024-03-07 01:38:59 +0000 nvme: Add SMART WARNING for persistent memory region NVME 2.0 added persistent memory regions, and this bit reports critical warnings / errors with those regions. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D44213 --- sys/dev/nvme/nvme.h | 3 ++- sys/dev/nvme/nvme_ctrlr.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 137aff792868..9013e79b8882 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -553,8 +553,9 @@ enum nvme_critical_warning_state { NVME_CRIT_WARN_ST_DEVICE_RELIABILITY = 0x4, NVME_CRIT_WARN_ST_READ_ONLY = 0x8, NVME_CRIT_WARN_ST_VOLATILE_MEMORY_BACKUP = 0x10, + NVME_CRIT_WARN_ST_PERSISTENT_MEMORY_REGION = 0x20, }; -#define NVME_CRIT_WARN_ST_RESERVED_MASK (0xE0) +#define NVME_CRIT_WARN_ST_RESERVED_MASK (0xC0) #define NVME_ASYNC_EVENT_NS_ATTRIBUTE (0x100) #define NVME_ASYNC_EVENT_FW_ACTIVATE (0x200) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index ca26ca8e92d8..7334c7169efb 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -663,6 +663,9 @@ nvme_ctrlr_log_critical_warnings(struct nvme_controller *ctrlr, if (state & NVME_CRIT_WARN_ST_VOLATILE_MEMORY_BACKUP) nvme_printf(ctrlr, "SMART WARNING: volatile memory backup device failed\n"); + if (state & NVME_CRIT_WARN_ST_PERSISTENT_MEMORY_REGION) + nvme_printf(ctrlr, "SMART WARNING: persistent memory read only or unreliable\n"); + if (state & NVME_CRIT_WARN_ST_RESERVED_MASK) nvme_printf(ctrlr, "SMART WARNING: unknown critical warning(s): state = 0x%02x\n", state & NVME_CRIT_WARN_ST_RESERVED_MASK);