From nobody Tue Aug 16 16:17:21 2022 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 4M6bry0fD2z4YlmB; Tue, 16 Aug 2022 16:17:22 +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 4M6bry03wwz3bjP; Tue, 16 Aug 2022 16:17:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660666642; 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=+EUC5UbZyU7dlftAViKIcqw2mEotDuOC+gMYaPDl1xg=; b=iwcAs4CmsVa+r/nLlE7+qtmu71kyTnMp59IRtcbMkOn88GzzC/o4bj7oNti+gYRt9rHrUS bJZMpI3Hk0P/e6PxwK+usf/xq2bqg1mBGDdT/o2EW5dWuNjbLwZwBLRN7418F9dD8o7ocn 1RnGQyA7Vvi8BQBC8sdjP7LdFAG13nz4SoKVyUCAux4ZkR5/pkBHxPzjGrJvhBwGKz826Z ocSxJjcsPQKXFcnhI6ZZKApTktGssMt8q/nAp51yCA/bsN3a3uiWytOCj6qcQQGw+4FPId cBbdqWNqNPmjwo6ChmnWyEaVadOfxa+7Aa2HYysydynP5gO2Tqc7gdDiB5vtcw== 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 4M6brx6BBYzFym; Tue, 16 Aug 2022 16:17:21 +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 27GGHLiF047041; Tue, 16 Aug 2022 16:17:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27GGHLnS047040; Tue, 16 Aug 2022 16:17:21 GMT (envelope-from git) Date: Tue, 16 Aug 2022 16:17:21 GMT Message-Id: <202208161617.27GGHLnS047040@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: ec0efe34dd48 - main - bhyve nvme: Fix reported SANICAP value 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: chuck X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec0efe34dd486359d57bc1e792a0e4f9280f66d7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660666642; 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=+EUC5UbZyU7dlftAViKIcqw2mEotDuOC+gMYaPDl1xg=; b=vut/jM9swDFxmDFg+xrpMvdN97+vq+71n1wQ9qOOBzZ0d34lWbEdv+8XsN3Dq2IftnZq7m Nlpr2QIV7m6UTwSTLCWy9WWATXT/ugAaA5iqidWyiIYB8m46aABOclJ49GbT43hVktZ1vU pctpJaPOZhniHvmxFaHl4OnzTaG1FyzWiLUCyeERRpWCTZ4BxD+YHQjN+o4OWa7/QTY7NS heDY3YVPVdttLigajdyN9/hG2OPhJcsxmx/5PX8BH9zBVnIcayOKQ3NOZcGajHv/9qhXdA kWhOW4ZV7/SFDwkJD9G0YQLljuMmVmFEqSoUQELYVuB8LOf9xWa2Ku9CcnQ+Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660666642; a=rsa-sha256; cv=none; b=X7mFotuxM+1MKAl82EbsGYQjkZUvlyIbGwo4GmO5aAAtWFLJ0sd2n5JEIGE9LF0f4mCx/1 abzHQBZMP+kjchyQ8Tog6fvk+zvtVWWb+Cw0Bw9SCy0nGUmqVqvwPCIad0LEkTz5/WibcH yDD4SOuI1CPoF/DG1MjStoIlrD/i2zxU411VT3g9aIQNOTznYyHXLXmOk5XcYqBMivsW8c ADgVF7A62uJ7v36/fgBs/3HdZ1eyg73f0zozUZCupYxEYcMaRtMIX3r4MdgE4b1cBTLTmd uHXmUGU1tuHe7120WTVMExN4txt9TdD81d4TSusuf14RYROyDvIxFobA3KQaAA== 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=ec0efe34dd486359d57bc1e792a0e4f9280f66d7 commit ec0efe34dd486359d57bc1e792a0e4f9280f66d7 Author: Chuck Tuffli AuthorDate: 2022-08-16 16:14:43 +0000 Commit: Chuck Tuffli CommitDate: 2022-08-16 16:14:43 +0000 bhyve nvme: Fix reported SANICAP value The NVMe specification only allows Controllers compliant with the revision 1.3 and earlier specification to report a value of 0x0 in the No-Deallocate Modifies Media After Sanitize (NODMMAS) field. For our revision 1.4 Controller, report that media is not modified after Sanitize as the implementation does not implement Sanitize. Fixes UNH Test 1.1.2 Reviewed by: jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D36192 --- 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 70ae22c71a37..7701d0b932ee 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -560,6 +560,10 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) cd->wctemp = 0x0157; cd->cctemp = 0x0157; + /* SANICAP must not be 0 for Revision 1.4 and later NVMe Controllers */ + cd->sanicap = (NVME_CTRLR_DATA_SANICAP_NODMMAS_NO << + NVME_CTRLR_DATA_SANICAP_NODMMAS_SHIFT); + cd->sqes = (6 << NVME_CTRLR_DATA_SQES_MAX_SHIFT) | (6 << NVME_CTRLR_DATA_SQES_MIN_SHIFT); cd->cqes = (4 << NVME_CTRLR_DATA_CQES_MAX_SHIFT) |