hw/block/nvme: add temperature threshold feature

It might seem weird to implement this feature for an emulated device,
but it is mandatory to support and the feature is useful for testing
asynchronous event request support, which will be added in a later
patch.

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-6-its@irrelevant.dk>
This commit is contained in:
Klaus Jensen 2020-07-06 08:12:50 +02:00
parent 1504ede693
commit 69ff06c49e
3 changed files with 53 additions and 1 deletions

View file

@ -861,7 +861,10 @@ enum NvmeIdCtrlOncs {
typedef struct NvmeFeatureVal {
uint32_t arbitration;
uint32_t power_mgmt;
uint32_t temp_thresh;
struct {
uint16_t temp_thresh_hi;
uint16_t temp_thresh_low;
};
uint32_t err_rec;
uint32_t volatile_wc;
uint32_t num_queues;