diff options
author | zhenwei pi | 2021-01-15 04:27:02 +0100 |
---|---|---|
committer | Klaus Jensen | 2021-02-08 21:15:53 +0100 |
commit | c62720f137dffcefa7f03ac1a51b4aadba2a38be (patch) | |
tree | e93beb4df3a0d3091536961d14a0a4ca1cb340db /include/block | |
parent | hw/block/nvme: add smart_critical_warning property (diff) | |
download | qemu-c62720f137dffcefa7f03ac1a51b4aadba2a38be.tar.gz qemu-c62720f137dffcefa7f03ac1a51b4aadba2a38be.tar.xz qemu-c62720f137dffcefa7f03ac1a51b4aadba2a38be.zip |
hw/block/nvme: trigger async event during injecting smart warning
During smart critical warning injection by setting property from QMP
command, also try to trigger asynchronous event.
Suggested by Keith, if a event has already been raised, there is no
need to enqueue the duplicate event any more.
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
[k.jensen: fix typo in commit message]
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/nvme.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/nvme.h b/include/block/nvme.h index 88af3b4234..854fb2abb6 100644 --- a/include/block/nvme.h +++ b/include/block/nvme.h @@ -784,6 +784,7 @@ typedef struct QEMU_PACKED NvmeSmartLog { uint8_t reserved2[320]; } NvmeSmartLog; +#define NVME_SMART_WARN_MAX 6 enum NvmeSmartWarn { NVME_SMART_SPARE = 1 << 0, NVME_SMART_TEMPERATURE = 1 << 1, |