From nobody Sat Jan 29 23:15:45 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 88B88197B223; Sat, 29 Jan 2022 23:15:48 +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 4JmVYZ3jxkz3sTw; Sat, 29 Jan 2022 23:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643498146; 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=rfbVKDbiuOEoORtx5nG9y+c5T9DXfmmjPVdMEzmXT88=; b=f7YSvVvpSr6M6C/+fzPs30MKdMMrISOafNQ4oLAY7GfHmo0wK5AUexU8bDuoNPFPBhgTM7 PUI39+w2821NOls1QpmtpL0uHkyD6VU41vy6X4dzWcMi+eRv54nnH4hUki9XO+NvGGfr4h uuAanmx5I/OAi7PVyD+eksWZCKq+9i/CRbVI1aR61KuRiwVqWfDigJBSSBa2kYk5XllHIY 8UiguCB0oW/BP4eCHTpeVoCzUB3lyOsSALZL9TU/8Wb+sre/OSJgYBz9Mkou3qv2xeiCvg dJAWXrBejvWRLAXUqKOWsx73Iw0x3usHTV+Tx+jOwBY0oVlAlGZa9ItyfTA3Yg== 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 692741E47D; Sat, 29 Jan 2022 23:15:45 +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 20TNFjLh008307; Sat, 29 Jan 2022 23:15:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20TNFj4U008306; Sat, 29 Jan 2022 23:15:45 GMT (envelope-from git) Date: Sat, 29 Jan 2022 23:15:45 GMT Message-Id: <202201292315.20TNFj4U008306@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: 29241c96f75b - main - bhyve nvme: Update v1.4 Identify Controller data 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: 29241c96f75b38f09fb8752a18ac1ae1b864325e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643498146; 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=rfbVKDbiuOEoORtx5nG9y+c5T9DXfmmjPVdMEzmXT88=; b=giqbnnduxYMkw1dS+Y+4VUP7UDkMsWMIASISZTWLuzOI+qufM52hQ/McZNmjZQOzpxKGT7 0KID0qzZhyn++ACi0IRsvG9ZFU94hFTYdSsEQeQ3Ri0BHaa1xXPDEs63ZJYgmIFJEBUOxy AKJVD8NL1NNl4QR7mUTdSnJi3OixC/xcAmbTosCUZoTBW2TBPrSNYuC0oznAsyXBEmeUIE CK9RSuAecciAFAnk1rdsdwcmvWR6VxQYPE7z5aYvBmu7Lc7KNLItujKGTeh6+Se4Z8zKSR GSRaaxoV1RNMxBwdhbj9ocYOixaDYGtL6DSndRXV8/zbVSl532aKYWIBT55uPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643498146; a=rsa-sha256; cv=none; b=p/UfATbEp2MU/l+xCQD1BpQAiM7UwLS2+oabOUaVIJ0xOcNQvXxRR/x+ZBwxPVrer8cLNQ RiKaNsDwEM2FzfYYYn3PBq3nbbwJsUL+YwgloGZd2xTu805WB2QfEHJgfg8QFlKXuo8y3N lvDzh6pyT5IteSdA4id+QNhcN52yLq8LdBgl7kyUUQFWO8ADEUh5MOiAI3aqfBpLzqxi8N 5MZb1SdYbHC+1yjkgQ8T4nnHVXuTDydn8hmInFtEnxpryTzwa09ENdJ+Yk/tnY2oM2oAhg yQL+gTWuOHBW4hNtqzypLjc2fSksryzQVz/M7VbeO9lwCv8ZJoH0b/w6D0pbOA== 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=29241c96f75b38f09fb8752a18ac1ae1b864325e commit 29241c96f75b38f09fb8752a18ac1ae1b864325e Author: Chuck Tuffli AuthorDate: 2022-01-30 07:09:10 +0000 Commit: Chuck Tuffli CommitDate: 2022-01-30 07:09:10 +0000 bhyve nvme: Update v1.4 Identify Controller data Compliant v1.4 Controllers must report a Controller Type (CNTRLTYPE). Also, do not advertise secure erase functionality in the Format NVM Attributes field of the Identify Controller data structure as the Controller does not implement secure erase. Fixes UNH ILO Test 1.1, Case 2 Reviewed by: imp, allanjude Tested by: jason@tubnor.net MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33573 --- usr.sbin/bhyve/pci_nvme.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 03338f6e0664..39d1827c2c96 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -287,6 +287,12 @@ struct pci_nvme_aen { bool posted; }; +typedef enum { + NVME_CNTRLTYPE_IO = 1, + NVME_CNTRLTYPE_DISCOVERY = 2, + NVME_CNTRLTYPE_ADMIN = 3, +} pci_nvme_cntrl_type; + struct pci_nvme_softc { struct pci_devinst *nsc_pi; @@ -517,6 +523,7 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) cd->ver = NVME_REV(1,4); + cd->cntrltype = NVME_CNTRLTYPE_IO; cd->oacs = 1 << NVME_CTRLR_DATA_OACS_FORMAT_SHIFT; cd->acl = 2; cd->aerl = 4; @@ -551,7 +558,8 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) break; } - cd->fna = 0x03; + cd->fna = NVME_CTRLR_DATA_FNA_FORMAT_ALL_MASK << + NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT; cd->power_state[0].mp = 10; }