Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160256970
D25399.id73464.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D25399.id73464.diff
View Options
Index: usr.sbin/bhyve/bhyve.8
===================================================================
--- usr.sbin/bhyve/bhyve.8
+++ usr.sbin/bhyve/bhyve.8
@@ -536,6 +536,10 @@
Sector size (defaults to blockif sector size).
.It Li ser
Serial number with maximum 20 characters.
+.It Li model
+Model number with maximum 40 characters.
+.It Li rev
+Revision with maximum 8 characters.
.El
.Pp
HD Audio devices:
Index: usr.sbin/bhyve/pci_nvme.c
===================================================================
--- usr.sbin/bhyve/pci_nvme.c
+++ usr.sbin/bhyve/pci_nvme.c
@@ -33,7 +33,8 @@
* bhyve PCIe-NVMe device emulation.
*
* options:
- * -s <n>,nvme,devpath,maxq=#,qsz=#,ioslots=#,sectsz=#,ser=A-Z,eui64=#
+ * -s <n>,nvme,devpath,maxq=#,qsz=#,ioslots=#,sectsz=#
+ * ,ser=A-Z,model=A-Z,rev=A-Z,eui64=#
*
* accepted devpath:
* /dev/blockdev
@@ -45,6 +46,8 @@
* ioslots = max number of concurrent io requests
* sectsz = sector size (defaults to blockif sector size)
* ser = serial number (20-chars max)
+ * model = model number (40-chars max)
+ * rev = revision (8-chars max)
* eui64 = IEEE Extended Unique Identifier (8 byte value)
*
*/
@@ -344,9 +347,6 @@
cd->vid = 0xFB5D;
cd->ssvid = 0x0000;
- cpywithpad((char *)cd->mn, sizeof(cd->mn), "bhyve-NVMe", ' ');
- cpywithpad((char *)cd->fr, sizeof(cd->fr), "1.0", ' ');
-
/* Num of submission commands that we can handle at a time (2^rab) */
cd->rab = 4;
@@ -2031,6 +2031,10 @@
sc->dataset_management = NVME_DATASET_MANAGEMENT_AUTO;
sectsz = 0;
+ struct nvme_controller_data *cd = &sc->ctrldata;
+ cpywithpad((char *)cd->mn, sizeof(cd->mn), "bhyve-NVMe", ' ');
+ cpywithpad((char *)cd->fr, sizeof(cd->fr), "1.0", ' ');
+
uopt = strdup(opts);
optidx = 0;
snprintf(sc->ctrldata.sn, sizeof(sc->ctrldata.sn),
@@ -2056,8 +2060,11 @@
* 7-bit ASCII, unused bytes should be space characters.
* Ref: NVMe v1.3c.
*/
- cpywithpad((char *)sc->ctrldata.sn,
- sizeof(sc->ctrldata.sn), config, ' ');
+ cpywithpad((char *)cd->sn, sizeof(cd->sn), config, ' ');
+ } else if (!strcmp("model", xopts)) {
+ cpywithpad((char *)cd->mn, sizeof(cd->mn), config, ' ');
+ } else if (!strcmp("rev", xopts)) {
+ cpywithpad((char*)cd->fr, sizeof(cd->fr), config, ' ');
} else if (!strcmp("ram", xopts)) {
uint64_t sz = strtoull(&xopts[4], NULL, 10);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 23, 3:19 PM (12 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34251930
Default Alt Text
D25399.id73464.diff (2 KB)
Attached To
Mode
D25399: bhyve NVMe controller will accept model/rev config.
Attached
Detach File
Event Timeline
Log In to Comment