aboutsummaryrefslogtreecommitdiff
path: root/include/block/nvme.h
diff options
context:
space:
mode:
authorNaveen Nagar <naveen.n1@samsung.com>2021-08-23 16:33:33 +0530
committerKlaus Jensen <k.jensen@samsung.com>2021-09-24 08:43:52 +0200
commit07a3dfa7c41a94788881b649518507610c727994 (patch)
treedfee610eb20abe5412235a6e953cec4a5f8ef47e /include/block/nvme.h
parentfd761337aca5b55c133c3bec1b8bd4471cb9571a (diff)
hw/nvme: fix verification of select field in namespace attachment
Fix is added to check for reserved value in select field for namespace attachment CC: Minwoo Im <minwoo.im.dev@gmail.com> Signed-off-by: Naveen Nagar <naveen.n1@samsung.com> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'include/block/nvme.h')
-rw-r--r--include/block/nvme.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/block/nvme.h b/include/block/nvme.h
index 77aae01174..e3bd47bf76 100644
--- a/include/block/nvme.h
+++ b/include/block/nvme.h
@@ -1154,6 +1154,11 @@ enum NvmeIdCtrlCmic {
NVME_CMIC_MULTI_CTRL = 1 << 1,
};
+enum NvmeNsAttachmentOperation {
+ NVME_NS_ATTACHMENT_ATTACH = 0x0,
+ NVME_NS_ATTACHMENT_DETACH = 0x1,
+};
+
#define NVME_CTRL_SQES_MIN(sqes) ((sqes) & 0xf)
#define NVME_CTRL_SQES_MAX(sqes) (((sqes) >> 4) & 0xf)
#define NVME_CTRL_CQES_MIN(cqes) ((cqes) & 0xf)