diff options
author | Klaus Jensen | 2020-07-06 08:12:53 +0200 |
---|---|---|
committer | Klaus Jensen | 2020-09-02 08:48:50 +0200 |
commit | 5d5a53302b95c50197d007407d24e2da3397926a (patch) | |
tree | ff0142aa35b225521425b1aff84fff8d6897e999 /include/block/nvme.h | |
parent | hw/block/nvme: add support for the get log page command (diff) | |
download | qemu-5d5a53302b95c50197d007407d24e2da3397926a.tar.gz qemu-5d5a53302b95c50197d007407d24e2da3397926a.tar.xz qemu-5d5a53302b95c50197d007407d24e2da3397926a.zip |
hw/block/nvme: add support for the asynchronous event request command
Add support for the Asynchronous Event Request command. Required for
compliance with NVMe revision 1.3d. See NVM Express 1.3d, Section 5.2
("Asynchronous Event Request command").
Mostly imported from Keith's qemu-nvme tree. Modified with a max number
of queued events (controllable with the aer_max_queued device
parameter). The spec states that the controller *should* retain
events, so we do best effort here.
Signed-off-by: Klaus Jensen <klaus.jensen@cnexlabs.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Acked-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Message-Id: <20200706061303.246057-9-its@irrelevant.dk>
Diffstat (limited to 'include/block/nvme.h')
-rw-r--r-- | include/block/nvme.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/block/nvme.h b/include/block/nvme.h index 9ec9f7d7a3..87fa60b8bd 100644 --- a/include/block/nvme.h +++ b/include/block/nvme.h @@ -598,8 +598,8 @@ enum NvmeAsyncEventRequest { NVME_AER_TYPE_SMART = 1, NVME_AER_TYPE_IO_SPECIFIC = 6, NVME_AER_TYPE_VENDOR_SPECIFIC = 7, - NVME_AER_INFO_ERR_INVALID_SQ = 0, - NVME_AER_INFO_ERR_INVALID_DB = 1, + NVME_AER_INFO_ERR_INVALID_DB_REGISTER = 0, + NVME_AER_INFO_ERR_INVALID_DB_VALUE = 1, NVME_AER_INFO_ERR_DIAG_FAIL = 2, NVME_AER_INFO_ERR_PERS_INTERNAL_ERR = 3, NVME_AER_INFO_ERR_TRANS_INTERNAL_ERR = 4, @@ -900,6 +900,10 @@ typedef struct NvmeFeatureVal { #define NVME_TEMP_TMPTH(temp) (temp & 0xffff) +#define NVME_AEC_SMART(aec) (aec & 0xff) +#define NVME_AEC_NS_ATTR(aec) ((aec >> 8) & 0x1) +#define NVME_AEC_FW_ACTIVATION(aec) ((aec >> 9) & 0x1) + enum NvmeFeatureIds { NVME_ARBITRATION = 0x1, NVME_POWER_MANAGEMENT = 0x2, |