Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171015248
D32767.id97783.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32767.id97783.diff
View Options
Index: usr.sbin/bhyve/pci_nvme.c
===================================================================
--- usr.sbin/bhyve/pci_nvme.c
+++ usr.sbin/bhyve/pci_nvme.c
@@ -115,6 +115,11 @@
#define NVME_NO_STATUS 0xffff
#define NVME_COMPLETION_VALID(c) ((c).status != NVME_NO_STATUS)
+#define NVME_FEAT_SET_SV_SHIFT (31)
+#define NVME_FEAT_SET_SV_MASK (0x1)
+#define NVME_FEAT_SET_FID_SHIFT (0)
+#define NVME_FEAT_SET_FID_MASK (0xFF)
+
/* helpers */
/* Convert a zero-based value into a one-based value */
@@ -1382,7 +1387,10 @@
{
struct nvme_feature_obj *feat;
uint32_t nsid = command->nsid;
- uint8_t fid = command->cdw10 & 0xFF;
+ uint8_t fid = (command->cdw10 >> NVME_FEAT_SET_FID_SHIFT) &
+ NVME_FEAT_SET_FID_MASK;
+ bool save = (command->cdw10 >> NVME_FEAT_SET_SV_SHIFT) &
+ NVME_FEAT_SET_SV_MASK;
DPRINTF("%s: Feature ID 0x%x (%s)", __func__, fid, nvme_fid_to_name(fid));
@@ -1391,6 +1399,12 @@
pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD);
return (1);
}
+ if (save) {
+ DPRINTF("%s feature is not saveable 0x%x", __func__, fid);
+ pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC,
+ NVME_SC_FEATURE_NOT_SAVEABLE);
+ return (1);
+ }
feat = &sc->feat[fid];
if (!feat->namespace_specific &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 9, 5:04 AM (17 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38563738
Default Alt Text
D32767.id97783.diff (1 KB)
Attached To
Mode
D32767: bhyve: abort and return FEATURE_NOT_SAVEABLE while set feature with a save flag for NVMe controller.
Attached
Detach File
Event Timeline
Log In to Comment