hw/block/nvme: add support for the asynchronous event request command
authorKlaus Jensen <k.jensen@samsung.com>
Mon, 6 Jul 2020 06:12:53 +0000 (08:12 +0200)
committerKlaus Jensen <k.jensen@samsung.com>
Wed, 2 Sep 2020 06:48:50 +0000 (08:48 +0200)
commit5d5a53302b95c50197d007407d24e2da3397926a
treeff0142aa35b225521425b1aff84fff8d6897e999
parent94a7897c41db0596c544af1bd27eedb833eae496
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>
hw/block/nvme.c
hw/block/nvme.h
hw/block/trace-events
include/block/nvme.h