From nobody Sat Nov 19 17:55:27 2022 X-Original-To: dev-commits-src-branches@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 4NF1XH57YMz4hV15; Sat, 19 Nov 2022 17:55:27 +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 4NF1XH4SXWz46WG; Sat, 19 Nov 2022 17:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668880527; 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=I6eHOiiDR2T50DIuxt80voZq9bBixNmOQtSH/xCifzM=; b=AFjzo0nyCR0c1fNCJV07Wzr8TWizSlR++xnsJq1/Kw6BgNT3KLbBIn9scVN3d17gnLJbUj xtS2lhRY7qtN6/bUIePcKOSSD5cmhxrg35KP/YmJfXhaHi5Krhr67tMcHfiztWxyRuRLRh aTL/dNskflaq7x+mGlGlCzqbE2ssYZiTQZeL5kStv2RFvjuPNK831TE73mHQrxu2KcTaf6 g/YxFM+r6J/sZWVgSn0pvLBmqxJgHoPA3lYE+kQtfTWYePjNpd4gJH7AtIfO52Ldjd/efE lD0n2TU341/oR4Ytkyw8WnfKaJbFrEhx3Pv14OX9bhlv1pvbtFvXU3srLod0Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668880527; 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=I6eHOiiDR2T50DIuxt80voZq9bBixNmOQtSH/xCifzM=; b=LYB3PelxW5adOk4c63PZ1+cMQnhdD96imfoqHnLX7Kn8F74RYsS8UZYVWT4XKmTWYCODhV 4uKAcxINtpuoGq3mLcIQTqcFV1T05fyLvcvPuDMda1QDX9RlKDj9n7orJ+dueU0JHvpECu enVLdcL/IQ7K4mHfhYxF3cy4/VKKwkJpr59EtxlOkEFKuPHeEPZs8AzZQY2ovQiFgZ1SmS Tryl5BLYmqOGmKF8aZVwN6UAeiRIzf/8SvMI5ObJCS9mw/dtM/gd3i7T4T81ugNnz8JGRB QEgJa6V0gp+nLjZtzQNyqNKy5f0fyACihsQMYpLtBY7RcicFgQX5WDaytxxrqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668880527; a=rsa-sha256; cv=none; b=wrxrG4VO0Hh7Hj2HGFhpiPfVKciOvLKvobf9KEPzvU6w14jNoz6MAW5oJ0rB+N7CDH30jj leiym5N/tT+50uxCpUYU/Figr7RxQMzJz67LDOtTqfz7xsw3TTVpZK0hO6cpcJlhjQwsIa nR/vM0yKSBkmhMZk3osu7LZZ0RVMC2ucftH9bOgMdw0qMW+vvi5c05zQGyuBFghtLl9GrN Ht/drOi9974K9GOB5SRnaJEq7DvccHsO4JIY+AATcX6zyR3K0F235cIHFpj26Mj2Mncl4V 8+YxqRnQxEAefwOU1fESj3crPHiyiI9OjjlhZD0qcRdhTV12ZYxYoBt97gBuxA== 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 4NF1XH3R9Zzv3x; Sat, 19 Nov 2022 17:55:27 +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 2AJHtRQf039098; Sat, 19 Nov 2022 17:55:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AJHtRS1039097; Sat, 19 Nov 2022 17:55:27 GMT (envelope-from git) Date: Sat, 19 Nov 2022 17:55:27 GMT Message-Id: <202211191755.2AJHtRS1039097@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: f70653fc82ba - stable/13 - bhyve nvme: Support minimal Controller list List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: f70653fc82bafdf0818666b4d803eaf4e4e579a9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=f70653fc82bafdf0818666b4d803eaf4e4e579a9 commit f70653fc82bafdf0818666b4d803eaf4e4e579a9 Author: Chuck Tuffli AuthorDate: 2022-08-16 16:15:53 +0000 Commit: Chuck Tuffli CommitDate: 2022-11-20 01:55:02 +0000 bhyve nvme: Support minimal Controller list Controllers must support the Identify Controller list if they support Namespace Management. But the UNH NVMe tests use this command regardless of whether the device under test supports Namespace Management. This implementation returns an empty Controller list (i.e., Number of Identifiers is zero). Fixes UNH Test 1.1.2 (cherry picked from commit 715f82e4f5c51c04314904dee8090c8abbbe2156) --- usr.sbin/bhyve/pci_nvme.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 9ab23792d58d..141ec2248aeb 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -1541,6 +1541,15 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nvme_command* command, ((uint8_t *)dest)[1] = sizeof(uint64_t); bcopy(sc->nsdata.eui64, ((uint8_t *)dest) + 4, sizeof(uint64_t)); break; + case 0x13: + /* + * Controller list is optional but used by UNH tests. Return + * a valid but empty list. + */ + dest = vm_map_gpa(sc->nsc_pi->pi_vmctx, command->prp1, + sizeof(uint16_t) * 2048); + memset(dest, 0, sizeof(uint16_t) * 2048); + break; default: DPRINTF("%s unsupported identify command requested 0x%x", __func__, command->cdw10 & 0xFF);