Date: Mon, 29 Jun 2020 00:32:25 +0000 (UTC) From: Chuck Tuffli <chuck@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362766 - head/usr.sbin/bhyve Message-ID: <202006290032.05T0WPaf050185@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: chuck Date: Mon Jun 29 00:32:24 2020 New Revision: 362766 URL: https://svnweb.freebsd.org/changeset/base/362766 Log: bhyve: fix NVMe Active Namespace list The NVMe specification requires unused entries in the Identify, Active Namespace ID data to be zero. Fix is bzero the provided page, similar to what is done for the Namespace Descriptors list. Fixes UNH Tests 2.6 and 2.9 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24901 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:21 2020 (r362765) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:24 2020 (r362766) @@ -1144,8 +1144,9 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nv case 0x02: /* list of 1024 active NSIDs > CDW1.NSID */ dest = vm_map_gpa(sc->nsc_pi->pi_vmctx, command->prp1, sizeof(uint32_t) * 1024); + /* All unused entries shall be zero */ + bzero(dest, sizeof(uint32_t) * 1024); ((uint32_t *)dest)[0] = 1; - ((uint32_t *)dest)[1] = 0; break; case 0x03: /* list of NSID structures in CDW1.NSID, 4096 bytes */ if (command->nsid != 1) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006290032.05T0WPaf050185>