summary refs log tree commit diff stats
path: root/hw/nvme/nvme.h
diff options
context:
space:
mode:
authorNiklas Cassel <niklas.cassel@wdc.com>2021-05-28 11:05:07 +0000
committerKlaus Jensen <k.jensen@samsung.com>2021-06-29 07:16:25 +0200
commitcccc2651f4222e587582867e966b054dd4b51a0e (patch)
tree42f061528cd84274783ec47f5fcc9ceae38affef /hw/nvme/nvme.h
parent421a30927140945c6aa957c2c0e7ad695984483d (diff)
downloadfocaccia-qemu-cccc2651f4222e587582867e966b054dd4b51a0e.tar.gz
focaccia-qemu-cccc2651f4222e587582867e966b054dd4b51a0e.zip
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>
Diffstat (limited to 'hw/nvme/nvme.h')
-rw-r--r--hw/nvme/nvme.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/nvme/nvme.h b/hw/nvme/nvme.h
index 81a35cda14..93a7e0e538 100644
--- a/hw/nvme/nvme.h
+++ b/hw/nvme/nvme.h
@@ -382,6 +382,7 @@ typedef struct NvmeParams {
     uint8_t  vsl;
     bool     use_intel_id;
     uint8_t  zasl;
+    bool     auto_transition_zones;
     bool     legacy_cmb;
 } NvmeParams;