OSDN Git Service

hw/block/nvme: add support for the get log page command
authorKlaus Jensen <k.jensen@samsung.com>
Mon, 6 Jul 2020 06:12:52 +0000 (08:12 +0200)
committerKlaus Jensen <k.jensen@samsung.com>
Wed, 2 Sep 2020 06:48:50 +0000 (08:48 +0200)
commit94a7897c41db0596c544af1bd27eedb833eae496
tree8ac6eb2dcc30955805871cb1b2f451fb2d44c602
parent42a42e4610ab9e4ca0bcc976f4b19f9f612a085e
hw/block/nvme: add support for the get log page command

Add support for the Get Log Page command and basic implementations of
the mandatory Error Information, SMART / Health Information and Firmware
Slot Information log pages.

In violation of the specification, the SMART / Health Information log
page does not persist information over the lifetime of the controller
because the device has no place to store such persistent state.

Note that the LPA field in the Identify Controller data structure
intentionally has bit 0 cleared because there is no namespace specific
information in the SMART / Health information log page.

Required for compliance with NVMe revision 1.3d. See NVM Express 1.3d,
Section 5.14 ("Get Log Page command").

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: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20200706061303.246057-8-its@irrelevant.dk>
hw/block/nvme.c
hw/block/nvme.h
hw/block/trace-events
include/block/nvme.h