<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/uapi/linux/virtio_blk.h, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-04-04T15:01:57+00:00</updated>
<entry>
<title>virtio-blk: fix to match virtio spec</title>
<updated>2023-04-04T15:01:57+00:00</updated>
<author>
<name>Dmitry Fomichev</name>
<email>dmitry.fomichev@wdc.com</email>
</author>
<published>2023-03-30T21:49:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f1ba4e674febf5c0e9f725a75ca43b7722b4e963'/>
<id>urn:sha1:f1ba4e674febf5c0e9f725a75ca43b7722b4e963</id>
<content type='text'>
The merged patch series to support zoned block devices in virtio-blk
is not the most up to date version. The merged patch can be found at

https://lore.kernel.org/linux-block/20221016034127.330942-3-dmitry.fomichev@wdc.com/

but the latest and reviewed version is

https://lore.kernel.org/linux-block/20221110053952.3378990-3-dmitry.fomichev@wdc.com/

The reason is apparently that the correct mailing lists and
maintainers were not copied.

The differences between the two are mostly cleanups, but there is one
change that is very important in terms of compatibility with the
approved virtio-zbd specification.

Before it was approved, the OASIS virtio spec had a change in
VIRTIO_BLK_T_ZONE_APPEND request layout that is not reflected in the
current virtio-blk driver code. In the running code, the status is
the first byte of the in-header that is followed by some pad bytes
and the u64 that carries the sector at which the data has been written
to the zone back to the driver, aka the append sector.

This layout turned out to be problematic for implementing in QEMU and
the request status byte has been eventually made the last byte of the
in-header. The current code doesn't expect that and this causes the
append sector value always come as zero to the block layer. This needs
to be fixed ASAP.

Fixes: 95bfec41bd3d ("virtio-blk: add support for zoned block devices")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Fomichev &lt;dmitry.fomichev@wdc.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Message-Id: &lt;20230330214953.1088216-2-dmitry.fomichev@wdc.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_blk: mark all zone fields LE</title>
<updated>2023-02-15T11:46:22+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2022-12-22T19:30:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b16a1756c716235891e298beabd68f3cd6bb5952'/>
<id>urn:sha1:b16a1756c716235891e298beabd68f3cd6bb5952</id>
<content type='text'>
zone is a virtio 1.x feature so all fields are LE,
they are handled as such, but have mistakenly been labeled
__virtioXX in the header.  This results in a bunch of sparse warnings.

Use the __leXX tags to make sparse happy.

Message-Id: &lt;20221222193214.55146-1-mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio-blk: add support for zoned block devices</title>
<updated>2023-02-15T11:46:22+00:00</updated>
<author>
<name>Dmitry Fomichev</name>
<email>dmitry.fomichev@wdc.com</email>
</author>
<published>2022-10-16T03:41:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=95bfec41bd3d39b7659cba65b72080420bf5691e'/>
<id>urn:sha1:95bfec41bd3d39b7659cba65b72080420bf5691e</id>
<content type='text'>
This patch adds support for Zoned Block Devices (ZBDs) to the kernel
virtio-blk driver.

The patch accompanies the virtio-blk ZBD support draft that is now
being proposed for standardization. The latest version of the draft is
linked at

https://github.com/oasis-tcs/virtio-spec/issues/143 .

The QEMU zoned device code that implements these protocol extensions
has been developed by Sam Li and it is currently in review at the QEMU
mailing list.

A number of virtblk request structure changes has been introduced to
accommodate the functionality that is specific to zoned block devices
and, most importantly, make room for carrying the Zoned Append sector
value from the device back to the driver along with the request status.

The zone-specific code in the patch is heavily influenced by NVMe ZNS
code in drivers/nvme/host/zns.c, but it is simpler because the proposed
virtio ZBD draft only covers the zoned device features that are
relevant to the zoned functionality provided by Linux block layer.

includes the following fixup:

virtio-blk: fix probe without CONFIG_BLK_DEV_ZONED

When building without CONFIG_BLK_DEV_ZONED, VIRTIO_BLK_F_ZONED
is excluded from array of driver features.
As a result virtio_has_feature panics in virtio_check_driver_offered_feature
since that by design verifies that a feature we are checking for
is listed in the feature array.

To fix, replace the call to virtio_has_feature with a stub.

Message-Id: &lt;20221016034127.330942-3-dmitry.fomichev@wdc.com&gt;
Co-developed-by: Stefan Hajnoczi &lt;stefanha@gmail.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@gmail.com&gt;
Signed-off-by: Dmitry Fomichev &lt;dmitry.fomichev@wdc.com&gt;
Message-Id: &lt;20221220112340.518841-1-mst@redhat.com&gt;
Reported-by: Linux Kernel Functional Testing &lt;lkft@linaro.org&gt;
Tested-by: Linux Kernel Functional Testing &lt;lkft@linaro.org&gt;
Reported-by: Xuan Zhuo &lt;xuanzhuo@linux.alibaba.com&gt;
Debugged-by: Xuan Zhuo &lt;xuanzhuo@linux.alibaba.com&gt;
Tested-by: Anders Roxell &lt;anders.roxell@linaro.org&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_blk: add SECURE ERASE command support</title>
<updated>2022-10-07T13:32:41+00:00</updated>
<author>
<name>Alvaro Karsz</name>
<email>alvaro.karsz@solid-run.com</email>
</author>
<published>2022-09-21T08:27:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e60d64074214db7207fc13c25ee39d8d47cb4a34'/>
<id>urn:sha1:e60d64074214db7207fc13c25ee39d8d47cb4a34</id>
<content type='text'>
Support for the VIRTIO_BLK_F_SECURE_ERASE VirtIO feature.

A device that offers this feature can receive VIRTIO_BLK_T_SECURE_ERASE
commands.

A device which supports this feature has the following fields in the
virtio config:

- max_secure_erase_sectors
- max_secure_erase_seg
- secure_erase_sector_alignment

max_secure_erase_sectors and secure_erase_sector_alignment are expressed
in 512-byte units.

Every secure erase command has the following fields:

- sectors: The starting offset in 512-byte units.
- num_sectors: The number of sectors.

Signed-off-by: Alvaro Karsz &lt;alvaro.karsz@solid-run.com&gt;
Message-Id: &lt;20220921082729.2516779-1-alvaro.karsz@solid-run.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_blk: correct tags for config space fields</title>
<updated>2020-08-05T15:08:39+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2020-07-10T11:17:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=40e04c488bd6ab1859778d40bf9bb3ca294ab97b'/>
<id>urn:sha1:40e04c488bd6ab1859778d40bf9bb3ca294ab97b</id>
<content type='text'>
Tag config space fields as having virtio endian-ness.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_blk: add discard and write zeroes support</title>
<updated>2018-12-19T23:23:49+00:00</updated>
<author>
<name>Changpeng Liu</name>
<email>changpeng.liu@intel.com</email>
</author>
<published>2018-11-01T22:40:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1f23816b8eb8fdc39990abe166c10a18c16f6b21'/>
<id>urn:sha1:1f23816b8eb8fdc39990abe166c10a18c16f6b21</id>
<content type='text'>
In commit 88c85538, "virtio-blk: add discard and write zeroes features
to specification" (https://github.com/oasis-tcs/virtio-spec), the virtio
block specification has been extended to add VIRTIO_BLK_T_DISCARD and
VIRTIO_BLK_T_WRITE_ZEROES commands.  This patch enables support for
discard and write zeroes in the virtio-blk driver when the device
advertises the corresponding features, VIRTIO_BLK_F_DISCARD and
VIRTIO_BLK_F_WRITE_ZEROES.

Signed-off-by: Changpeng Liu &lt;changpeng.liu@intel.com&gt;
Signed-off-by: Daniel Verkamp &lt;dverkamp@chromium.org&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_blk: VIRTIO_BLK_F_WCE-&gt;VIRTIO_BLK_F_FLUSH</title>
<updated>2016-03-02T15:01:59+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2016-02-24T15:07:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=592002f55e6e0b198a01d4a9315f74ddfea1c403'/>
<id>urn:sha1:592002f55e6e0b198a01d4a9315f74ddfea1c403</id>
<content type='text'>
Latest virtio spec says the feature bit name is VIRTIO_BLK_F_FLUSH,
VIRTIO_BLK_F_WCE is the legacy name.  virtio blk header says exactly the
reverse - fix that and update driver code to match.

Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_blk: fix comment for virtio 1.0</title>
<updated>2015-03-10T01:18:29+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2015-03-06T02:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0fa2a56437d0b7ef5d86eef2778ad3469ca72d5a'/>
<id>urn:sha1:0fa2a56437d0b7ef5d86eef2778ad3469ca72d5a</id>
<content type='text'>
Fix up comment to match virtio 1.0 logic:
virtio_blk_outhdr isn't the first elements anymore,
the only requirement is that it comes first in
the s/g list.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio_blk: typo fix</title>
<updated>2015-03-10T01:18:29+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2015-03-06T02:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7e41a9def062167b5405711a42c9ecfd163e31a9'/>
<id>urn:sha1:7e41a9def062167b5405711a42c9ecfd163e31a9</id>
<content type='text'>
Now that QEmu reuses linux virtio headers, we noticed
a typo in the exported virtio block header. Fix it up.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: Don't expose legacy block features when VIRTIO_BLK_NO_LEGACY defined.</title>
<updated>2015-02-11T04:33:15+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2015-02-11T04:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=527100a4ee744bbfc90f1609ee4a0144883b3e4a'/>
<id>urn:sha1:527100a4ee744bbfc90f1609ee4a0144883b3e4a</id>
<content type='text'>
This allows modern implementations to ensure they don't use legacy
feature bits or SCSI commands (which are not used in v1.0 non-legacy).

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
</feed>
