]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve: abort and return FEATURE_NOT_SAVEABLE while set feature with a save flag for...
authorWanpeng Qian <wanpengqian@gmail.com>
Mon, 14 Nov 2022 13:02:44 +0000 (14:02 +0100)
committerCorvin Köhne <corvink@FreeBSD.org>
Tue, 15 Nov 2022 06:48:24 +0000 (07:48 +0100)
commit8ab99dbea16728f3e34137310587a6aeb3f3d317
treeedb73f890cfae7ce38bf679dec3b70f8363b88d7
parent0fd43b0c6a76d7be4d9673837a7d7099b6a29ace
bhyve: abort and return FEATURE_NOT_SAVEABLE while set feature with a save flag for NVMe controller.

Currently bhyve's NVMe controller cannot save feature values cross
reboot. It should return a FEATURE_NOT_SAVEABLE error when the command
specifies a save flag.

Quote from NVMe specification, page 205:

https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf

If the Feature Identifier specified in the Set Features command is not
saveable by the controller and the controller receives a Set Features
command with the Save bit set to one, then the command shall be aborted
with a status of Feature Identifier Not Saveable.

Reviewed by: chuck (older version)
Approved by: manu (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D32767
sys/dev/nvme/nvme.h
usr.sbin/bhyve/pci_nvme.c