summaryrefslogtreecommitdiffstats
path: root/linux-user/mmap.c
diff options
context:
space:
mode:
authorKlaus Jensen2021-02-22 19:27:58 +0100
committerKlaus Jensen2021-03-09 11:00:57 +0100
commit578d914b263c1ec71e567b90d744075ea3a8ea74 (patch)
treec8864eb2ced631b8707c1a9ac0626f41c6a21a57 /linux-user/mmap.c
parenthw/block/nvme: deduplicate bad mdts trace event (diff)
downloadqemu-578d914b263c1ec71e567b90d744075ea3a8ea74.tar.gz
qemu-578d914b263c1ec71e567b90d744075ea3a8ea74.tar.xz
qemu-578d914b263c1ec71e567b90d744075ea3a8ea74.zip
hw/block/nvme: align zoned.zasl with mdts
ZASL (Zone Append Size Limit) is defined exactly like MDTS (Maximum Data Transfer Size), that is, it is a value in units of the minimum memory page size (CAP.MPSMIN) and is reported as a power of two. The 'mdts' nvme device parameter is specified as in the spec, but the 'zoned.append_size_limit' parameter is specified in bytes. This is suboptimal for a number of reasons: 1. It is just plain confusing wrt. the definition of mdts. 2. There is a lot of complexity involved in validating the value; it must be a power of two, it should be larger than 4k, if it is zero we set it internally to mdts, but still report it as zero. 3. While "hw/block/nvme: improve invalid zasl value reporting" slightly improved the handling of the parameter, the validation is still wrong; it does not depend on CC.MPS, it depends on CAP.MPSMIN. And we are not even checking that it is actually less than or equal to MDTS, which is kinda the *one* condition it must satisfy. Fix this by defining zasl exactly like mdts and checking the one thing that it must satisfy (that it is less than or equal to mdts). Also, change the default value from 128KiB to 0 (aka, whatever mdts is). Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'linux-user/mmap.c')
0 files changed, 0 insertions, 0 deletions