hw/nvme: add param to control auto zone transitioning to zone state closed
commitcccc2651f4222e587582867e966b054dd4b51a0e
authorNiklas Cassel <niklas.cassel@wdc.com>
Fri, 28 May 2021 11:05:07 +0000 (28 11:05 +0000)
committerKlaus Jensen <k.jensen@samsung.com>
Tue, 29 Jun 2021 05:16:25 +0000 (29 07:16 +0200)
tree42f061528cd84274783ec47f5fcc9ceae38affef
parent421a30927140945c6aa957c2c0e7ad695984483d
hw/nvme: add param to control auto zone transitioning to zone state closed

In the Zoned Namespace Command Set Specification, chapter
2.5.1 Managing resources

"The controller may transition zones in the ZSIO:Implicitly Opened state
to the ZSC:Closed state for resource management purposes."

The word may in this sentence means that automatically transitioning
an implicitly opened zone to closed is completely optional.

Add a new parameter so that the user can control if this automatic
transitioning should be performed or not.

Being able to control this can help with verifying that e.g. a user-space
program behaves properly even without this optional ZNS feature.

The default value is set to true, in order to not change the existing
behavior.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
[k.jensen: moved parameter to controller]
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/nvme/ctrl.c
hw/nvme/nvme.h