summaryrefslogtreecommitdiffstats
path: root/include/block/nvme.h
diff options
context:
space:
mode:
authorKlaus Jensen2020-06-09 21:03:16 +0200
committerKevin Wolf2020-06-17 14:53:40 +0200
commit3e829fd438033cdf8646ec22bcc869555b100212 (patch)
treee0adcd2a0194af8690c5788be2174c87183535eb /include/block/nvme.h
parenthw/block/nvme: move device parameters to separate struct (diff)
downloadqemu-3e829fd438033cdf8646ec22bcc869555b100212.tar.gz
qemu-3e829fd438033cdf8646ec22bcc869555b100212.tar.xz
qemu-3e829fd438033cdf8646ec22bcc869555b100212.zip
hw/block/nvme: use constants in identify
Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Message-Id: <20200609190333.59390-6-its@irrelevant.dk> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block/nvme.h')
-rw-r--r--include/block/nvme.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/block/nvme.h b/include/block/nvme.h
index 5525c8e343..1720ee1d51 100644
--- a/include/block/nvme.h
+++ b/include/block/nvme.h
@@ -705,6 +705,14 @@ typedef struct NvmePSD {
uint8_t resv[16];
} NvmePSD;
+#define NVME_IDENTIFY_DATA_SIZE 4096
+
+enum {
+ NVME_ID_CNS_NS = 0x0,
+ NVME_ID_CNS_CTRL = 0x1,
+ NVME_ID_CNS_NS_ACTIVE_LIST = 0x2,
+};
+
typedef struct NvmeIdCtrl {
uint16_t vid;
uint16_t ssvid;