diff options
author | Keith Busch | 2020-09-30 19:58:03 +0200 |
---|---|---|
committer | Klaus Jensen | 2020-10-27 11:29:25 +0100 |
commit | 8c5cea85934eb7b580ced14f7f188e19880d4c1c (patch) | |
tree | 3cb2e1fabfa9727da3b5e013f9e99a9d1b01db7c | |
parent | hw/block/nvme: validate command set selected (diff) | |
download | qemu-8c5cea85934eb7b580ced14f7f188e19880d4c1c.tar.gz qemu-8c5cea85934eb7b580ced14f7f188e19880d4c1c.tar.xz qemu-8c5cea85934eb7b580ced14f7f188e19880d4c1c.zip |
hw/block/nvme: support for admin-only command set
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
-rw-r--r-- | hw/block/nvme.c | 1 | ||||
-rw-r--r-- | include/block/nvme.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 94db06cf72..c1323ca869 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -2751,6 +2751,7 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev) NVME_CAP_SET_CQR(n->bar.cap, 1); NVME_CAP_SET_TO(n->bar.cap, 0xf); NVME_CAP_SET_CSS(n->bar.cap, NVME_CAP_CSS_NVM); + NVME_CAP_SET_CSS(n->bar.cap, NVME_CAP_CSS_ADMIN_ONLY); NVME_CAP_SET_MPSMAX(n->bar.cap, 4); n->bar.vs = NVME_SPEC_VER; diff --git a/include/block/nvme.h b/include/block/nvme.h index bc20a2ba5e..521533fd2a 100644 --- a/include/block/nvme.h +++ b/include/block/nvme.h @@ -83,7 +83,8 @@ enum NvmeCapMask { << CAP_PMR_SHIFT) enum NvmeCapCss { - NVME_CAP_CSS_NVM = 1 << 0, + NVME_CAP_CSS_NVM = 1 << 0, + NVME_CAP_CSS_ADMIN_ONLY = 1 << 7, }; enum NvmeCcShift { |