[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 48/56] hw/block/nvme: bump to v1.4
From: |
Klaus Jensen |
Subject: |
[PULL 48/56] hw/block/nvme: bump to v1.4 |
Date: |
Tue, 9 Feb 2021 08:30:53 +0100 |
From: Klaus Jensen <k.jensen@samsung.com>
With the new CMB logic in place, bump the implemented specification
version to v1.4 by default.
This requires adding the setting the CNTRLTYPE field and modifying the
VWC field since 0x00 is no longer a valid value for bits 2:1.
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
---
include/block/nvme.h | 3 ++-
hw/block/nvme.c | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/block/nvme.h b/include/block/nvme.h
index 2e85b97a6c4e..07cfc929368b 100644
--- a/include/block/nvme.h
+++ b/include/block/nvme.h
@@ -951,7 +951,8 @@ typedef struct QEMU_PACKED NvmeIdCtrl {
uint32_t rtd3e;
uint32_t oaes;
uint32_t ctratt;
- uint8_t rsvd100[12];
+ uint8_t rsvd100[11];
+ uint8_t cntrltype;
uint8_t fguid[16];
uint8_t rsvd128[128];
uint16_t oacs;
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 1e13d25b0887..c4c968f5951e 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -108,7 +108,7 @@
#define NVME_MAX_IOQPAIRS 0xffff
#define NVME_DB_SIZE 4
-#define NVME_SPEC_VER 0x00010300
+#define NVME_SPEC_VER 0x00010400
#define NVME_CMB_BIR 2
#define NVME_PMR_BIR 4
#define NVME_TEMPERATURE 0x143
@@ -4450,6 +4450,7 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice
*pci_dev)
id->mdts = n->params.mdts;
id->ver = cpu_to_le32(NVME_SPEC_VER);
id->oacs = cpu_to_le16(0);
+ id->cntrltype = 0x1;
/*
* Because the controller always completes the Abort command immediately,
@@ -4478,7 +4479,7 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice
*pci_dev)
NVME_ONCS_FEATURES | NVME_ONCS_DSM |
NVME_ONCS_COMPARE);
- id->vwc = 0x1;
+ id->vwc = (0x2 << 1) | 0x1;
id->sgls = cpu_to_le32(NVME_CTRL_SGLS_SUPPORT_NO_ALIGN |
NVME_CTRL_SGLS_BITBUCKET);
--
2.30.0
- [PULL 28/56] hw/block/nvme: Correct error status for unaligned ZA, (continued)
- [PULL 28/56] hw/block/nvme: Correct error status for unaligned ZA, Klaus Jensen, 2021/02/09
- [PULL 27/56] hw/block/nvme: remove unnecessary check for append, Klaus Jensen, 2021/02/09
- [PULL 45/56] hw/block/nvme: disable PMR at boot up, Klaus Jensen, 2021/02/09
- [PULL 30/56] hw/block/nvme: open code for volatile write cache, Klaus Jensen, 2021/02/09
- [PULL 31/56] hw/block/nvme: remove unused argument in nvme_ns_init_blk, Klaus Jensen, 2021/02/09
- [PULL 26/56] hw/block/nvme: add missing string representations for commands, Klaus Jensen, 2021/02/09
- [PULL 25/56] hw/block/nvme: zero out zones on reset, Klaus Jensen, 2021/02/09
- [PULL 40/56] hw/block/nvme: indicate CMB support through controller capabilities register, Klaus Jensen, 2021/02/09
- [PULL 41/56] hw/block/nvme: move msix table and pba to BAR 0, Klaus Jensen, 2021/02/09
- [PULL 29/56] hw/block/nvme: remove unused argument in nvme_ns_init_zoned, Klaus Jensen, 2021/02/09
- [PULL 48/56] hw/block/nvme: bump to v1.4,
Klaus Jensen <=
- [PULL 33/56] hw/block/nvme: remove unused argument in nvme_ns_setup, Klaus Jensen, 2021/02/09
- [PULL 38/56] hw/block/nvme: add size to mmio read/write trace events, Klaus Jensen, 2021/02/09
- [PULL 32/56] hw/block/nvme: split setup and register for namespace, Klaus Jensen, 2021/02/09
- [PULL 35/56] nvme: introduce bit 5 for critical warning, Klaus Jensen, 2021/02/09
- [PULL 42/56] hw/block/nvme: allow cmb and pmr to coexist, Klaus Jensen, 2021/02/09
- [PULL 46/56] hw/block/nvme: add PMR RDS/WDS support, Klaus Jensen, 2021/02/09