hw/nvme: add basic endurance group support

Add the mandatory Endurance Group identify data structures and log
pages.

For now, all namespaces in a subsystem belongs to a single Endurance
Group.

Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
Klaus Jensen 2023-02-20 12:59:24 +01:00
parent 534a93d3a0
commit 771dbc3ac4
4 changed files with 93 additions and 8 deletions

View file

@ -45,6 +45,10 @@ typedef struct NvmeBus {
OBJECT_CHECK(NvmeSubsystem, (obj), TYPE_NVME_SUBSYS)
#define SUBSYS_SLOT_RSVD (void *)0xFFFF
typedef struct NvmeEnduranceGroup {
uint8_t event_conf;
} NvmeEnduranceGroup;
typedef struct NvmeSubsystem {
DeviceState parent_obj;
NvmeBus bus;