svn commit: r342762 - head/usr.sbin/bhyve

Chuck Tuffli chuck at FreeBSD.org
Fri Jan 4 15:03:43 UTC 2019


Author: chuck
Date: Fri Jan  4 15:03:35 2019
New Revision: 342762
URL: https://svnweb.freebsd.org/changeset/base/342762

Log:
  Fix bhyve's NVMe Completion Queue entry values
  
  The function which processes Admin commands was not returning the
  Command Specific value in Completion Queue Entry, Dword 0 (CDW0). This
  effects commands such as Set Features, Number of Queues which returns
  the number of queues supported by the device in CDW0. In this case, the
  host will only create 1 queue pair (Number of Queues is zero based).
  This also masked a bug in the queue counting logic.
  
  Reviewed by: imp, araujo
  Approved by: imp (mentor)
  MFC after: 1 month
  Differential Revision: https://reviews.freebsd.org/D18703

Modified:
  head/usr.sbin/bhyve/pci_nvme.c

Modified: head/usr.sbin/bhyve/pci_nvme.c
==============================================================================
--- head/usr.sbin/bhyve/pci_nvme.c	Fri Jan  4 15:03:30 2019	(r342761)
+++ head/usr.sbin/bhyve/pci_nvme.c	Fri Jan  4 15:03:35 2019	(r342762)
@@ -983,6 +983,7 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u
 			cq = &sc->compl_queues[0];
 
 			cp = &(cq->qbase)[cq->tail];
+			cp->cdw0 = compl.cdw0;
 			cp->sqid = 0;
 			cp->sqhd = sqhead;
 			cp->cid = cmd->cid;


More information about the svn-src-all mailing list