From nobody Mon Feb 21 21:57:55 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 7715519EB0B0; Mon, 21 Feb 2022 21:57:56 +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 4K2bl765nbz4gP5; Mon, 21 Feb 2022 21:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645480676; 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=mr8bPpAf5ApzQsFke+tnfOJmQqCV7ygvHTSok6Kp7fI=; b=aj7wMXK2j9uiIp35tgo0WKYaNGBFxRAuO80Q+rd2YRH6uRdwKIvJ2o5WdIGhLACtwUZTj4 qPoPWjN7nlmDYdrLVFT6/sdOFEXpT12aaqUHuzOPGNb8Ov4/2z8+NOEmy9HilhtnLstPS2 RzNUMqDId73hlWkdhe9L8ZX8t+CQf2x4pLm8fjdBVGtC4skDXj8g4csSfemkn8jD8I764Y ET/dk37+RF2IWLsTYD8+6nQB+ZH0XCLQdGZXMxd2no75u+ObYDgXSjtaBfuzwaz5aL3RNS u9L3eMXbOszC75juXEsTyozye7a/a4o19GqtfhrSMhvEZbZff0QID4xWqe2+4w== 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 94B7818323; Mon, 21 Feb 2022 21:57:55 +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 21LLvtxr052088; Mon, 21 Feb 2022 21:57:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21LLvtmH052087; Mon, 21 Feb 2022 21:57:55 GMT (envelope-from git) Date: Mon, 21 Feb 2022 21:57:55 GMT Message-Id: <202202212157.21LLvtmH052087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Chuck Tuffli Subject: git: ae60b4cfe14b - stable/13 - bhyve nvme: Add missing Admin opcodes 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/stable/13 X-Git-Reftype: branch X-Git-Commit: ae60b4cfe14b134570875603c226ee2b86555714 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645480676; 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=mr8bPpAf5ApzQsFke+tnfOJmQqCV7ygvHTSok6Kp7fI=; b=NcXQvQsnO9mwRd0+p3Qn5Amm9xkIwFLfcdAlsTwikNXuBTDg7JVb6zTLPQpYVzmr6kYp4s Smz4TOxFZ2BWFCWip1QbyE0cmF8N+qwidNzaL7lmz3FhnqaGS6H7s4qoy38+Y7DB2fCTYK n1fxhLTZndwuHkSNSzh+WAswIclyCrf9KUtVEVq0tr0lP8FJwDrr4qBRYIa7sRCr3DKbAI OM03oKg9AG/+MEnWFEzRdqgrp8CLttVCt5UWQJgROP6Fl/NwIqM/GWBbFf9rHZQ0xXEyw0 TEtNuDjmuFEKlu/wypguYdVWigQfGke1m2J//YFfluiQa0VSyEroZYo9CPbZtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645480676; a=rsa-sha256; cv=none; b=NDT2Tsu7C7xQshvTpmMOtHjxSpGaptEqr5OkqmxQxNJJtJe56F5doP9IvAdo6xfwHlaqQF 42xdEFNcuoZxFS6zbN7y5hOOM7xkBjcQ6rbNLn/Et1RDEg9gopt4AcWaMdRRseeVCZXFx8 uTizNxX7/R8h9FFXQjPYwmIH/53mLDBOgKIPPvPKZXRtKR8yWt/ZVY8Q9LvKe9Q+J6Uiwf 1mEeK2VC1LOL+JZKeTtVImgY+mp+COzj/AQswVou/r1W0SZIWatEwAhcJGY6chhIIldcFN jAqtQ7cUYAB/DbH4nLJneRlYSgSGJu2Z3JtstF4rpd5eylDN3GjDU/aQlRly9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=ae60b4cfe14b134570875603c226ee2b86555714 commit ae60b4cfe14b134570875603c226ee2b86555714 Author: Chuck Tuffli AuthorDate: 2022-01-30 07:07:04 +0000 Commit: Chuck Tuffli CommitDate: 2022-02-22 03:26:06 +0000 bhyve nvme: Add missing Admin opcodes Don't treat unsupported Admin commands as Invalid Opcode. Instead return the proper Invalid Field in Command. Fixes UNH IOL test 1.17.2 (cherry picked from commit 785b5da318bf0e523fa00b3c9c6fde94b1156542) --- usr.sbin/bhyve/pci_nvme.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 78af3077f623..71abfa17deae 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -1936,6 +1936,13 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, uint64_t value) } nvme_opc_format_nvm(sc, cmd, &compl); break; + case NVME_OPC_SECURITY_SEND: + case NVME_OPC_SECURITY_RECEIVE: + case NVME_OPC_SANITIZE: + case NVME_OPC_GET_LBA_STATUS: + /* Valid but unsupported opcodes */ + pci_nvme_status_genc(&compl.status, NVME_SC_INVALID_FIELD); + break; default: DPRINTF("0x%x command is not implemented", cmd->opc);