<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/virtio, branch next</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>virtio: Fix virtio initialization sequence</title>
<updated>2026-03-25T20:33:00+00:00</updated>
<author>
<name>Christian Pötzsch</name>
<email>christian.poetzsch@kernkonzept.com</email>
</author>
<published>2026-03-10T14:16:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=30e1733297ac7d9703bd0950bd237648dcb41850'/>
<id>30e1733297ac7d9703bd0950bd237648dcb41850</id>
<content type='text'>
The virtio spec clearly states in "3.1.1 Driver Requirements: Device
Initialization" the sequence a client has to follow after device reset.
Because u-boot resets here again, it also needs to set the "acknowledge"
bit again even if this was done in virtio_uclass_child_post_bind already
once before.

Signed-off-by: Christian Pötzsch &lt;christian.poetzsch@kernkonzept.com&gt;
Signed-off-by: Adam Lackorzynski &lt;adam@l4re.org&gt;
[trini: Add VIRTIO_CONFIG_S_ACKNOWLEDGE flag check to the test]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The virtio spec clearly states in "3.1.1 Driver Requirements: Device
Initialization" the sequence a client has to follow after device reset.
Because u-boot resets here again, it also needs to set the "acknowledge"
bit again even if this was done in virtio_uclass_child_post_bind already
once before.

Signed-off-by: Christian Pötzsch &lt;christian.poetzsch@kernkonzept.com&gt;
Signed-off-by: Adam Lackorzynski &lt;adam@l4re.org&gt;
[trini: Add VIRTIO_CONFIG_S_ACKNOWLEDGE flag check to the test]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: rng: Handle oversized return buffers</title>
<updated>2026-03-25T20:32:38+00:00</updated>
<author>
<name>Kavin Gunasekara</name>
<email>kavin.gunasekara@arm.com</email>
</author>
<published>2026-03-09T16:55:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e0eef12a1f46bf946e24050a1da0f067c3952b89'/>
<id>e0eef12a1f46bf946e24050a1da0f067c3952b89</id>
<content type='text'>
If extra random bytes are returned, truncate and use the requested number
instead of returning an error.

Signed-off-by: Kavin Gunasekara &lt;kavin.gunasekara@arm.com&gt;
Signed-off-by: Meet Patel &lt;meet.patel2@arm.com&gt;
Reviewed-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If extra random bytes are returned, truncate and use the requested number
instead of returning an error.

Signed-off-by: Kavin Gunasekara &lt;kavin.gunasekara@arm.com&gt;
Signed-off-by: Meet Patel &lt;meet.patel2@arm.com&gt;
Reviewed-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: typo 'private date'</title>
<updated>2025-11-07T21:34:22+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-11-04T23:42:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6978d6ae5964c79bd25e0754a65141906e823cca'/>
<id>6978d6ae5964c79bd25e0754a65141906e823cca</id>
<content type='text'>
%s/private date/private data/

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
%s/private date/private data/

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: typo complaint</title>
<updated>2025-11-07T21:34:22+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-11-04T23:39:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b9af2d08094cbe785dd5d0018c30912ccd6af23e'/>
<id>b9af2d08094cbe785dd5d0018c30912ccd6af23e</id>
<content type='text'>
%s/v1.0 complaint/v1.0 compliant/

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
%s/v1.0 complaint/v1.0 compliant/

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virito: blk: fix logic to determine block sizes</title>
<updated>2025-10-17T00:01:42+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-10-09T16:44:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7e65d29b6618603a51053d5fa9f4ef585e5b8959'/>
<id>7e65d29b6618603a51053d5fa9f4ef585e5b8959</id>
<content type='text'>
With commit c85b8071e7d3 ("virtio: blk: support block sizes exceeding 512
bytes") logic was added to detect the VIRTIO_BLK_F_BLK_SIZE capability and
to copy the block size reported by QEMU to the block device descriptor.

The logical block size can be set when invoking QEMU:

    -drive if=none,file=4096.img,format=raw,id=vda \
    -device virtio-blk-device,drive=vda,physical_block_size=4096,logical_block_size=4096

In U-Boot the logical block size is shown by command `virtio info`:

    =&gt; virtio info
    Device 0: QEMU VirtIO Block Device
                Type: Hard Disk
                Capacity: 1024.0 MB = 1.0 GB (262144 x 4096)

There where two flaws which together hid that the logic was incorrect:

* VIRTIO_BLK_F_BLK_SIZE was missing in the driver capabilities and the bit
  was filtered out.
* The result of the call to virtio_has_feature() was negated.

The problem became apparent when using ARM FVP as emulator which does not set
VIRTIO_BLK_F_BLK_SIZE.

Fixes: c85b8071e7d3 ("virtio: blk: support block sizes exceeding 512 bytes")
Reported-by: Debbie Horsfall &lt;debbie.horsfall@arm.com&gt;
Tested-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With commit c85b8071e7d3 ("virtio: blk: support block sizes exceeding 512
bytes") logic was added to detect the VIRTIO_BLK_F_BLK_SIZE capability and
to copy the block size reported by QEMU to the block device descriptor.

The logical block size can be set when invoking QEMU:

    -drive if=none,file=4096.img,format=raw,id=vda \
    -device virtio-blk-device,drive=vda,physical_block_size=4096,logical_block_size=4096

In U-Boot the logical block size is shown by command `virtio info`:

    =&gt; virtio info
    Device 0: QEMU VirtIO Block Device
                Type: Hard Disk
                Capacity: 1024.0 MB = 1.0 GB (262144 x 4096)

There where two flaws which together hid that the logic was incorrect:

* VIRTIO_BLK_F_BLK_SIZE was missing in the driver capabilities and the bit
  was filtered out.
* The result of the call to virtio_has_feature() was negated.

The problem became apparent when using ARM FVP as emulator which does not set
VIRTIO_BLK_F_BLK_SIZE.

Fixes: c85b8071e7d3 ("virtio: blk: support block sizes exceeding 512 bytes")
Reported-by: Debbie Horsfall &lt;debbie.horsfall@arm.com&gt;
Tested-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: blk: support block sizes exceeding 512 bytes</title>
<updated>2025-09-10T17:02:23+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-08-30T20:39:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c85b8071e7d3fd333f8a2fdd28083cb5ec3a0645'/>
<id>c85b8071e7d3fd333f8a2fdd28083cb5ec3a0645</id>
<content type='text'>
QEMU allows to specify the logical block size via parameter
logical_block_size of a virtio-blk-device.

The communication channel via virtqueues remains based on 512 byte blocks
even if the logical_block_size is larger.

Consider the logical block size in the block device driver.

Reported-by: Emil Renner Berthing &lt;emil.renner.berthing@canonical.com&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Tested-by: Emil Renner Berthing &lt;emil.renner.berthing@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QEMU allows to specify the logical block size via parameter
logical_block_size of a virtio-blk-device.

The communication channel via virtqueues remains based on 512 byte blocks
even if the logical_block_size is larger.

Consider the logical block size in the block device driver.

Reported-by: Emil Renner Berthing &lt;emil.renner.berthing@canonical.com&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Tested-by: Emil Renner Berthing &lt;emil.renner.berthing@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: fix freeing of virtio ring buffer</title>
<updated>2025-08-07T17:15:54+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-07-26T06:17:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4b97de0e28fc215d3f41bb01f3410baa5e9243d8'/>
<id>4b97de0e28fc215d3f41bb01f3410baa5e9243d8</id>
<content type='text'>
If the allocation if the bounce buffer fails, virtio_free_pages is called
with a random value from the stack.

Ensure that vring.size is initialized.

Fixes: 37e53db38bdb ("virtio: Allocate bounce buffers for devices with VIRTIO_F_IOMMU_PLATFORM")
Addresses-Coverity-ID: 453314 Uninitialized scalar variable
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the allocation if the bounce buffer fails, virtio_free_pages is called
with a random value from the stack.

Ensure that vring.size is initialized.

Fixes: 37e53db38bdb ("virtio: Allocate bounce buffers for devices with VIRTIO_F_IOMMU_PLATFORM")
Addresses-Coverity-ID: 453314 Uninitialized scalar variable
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: net: Add missing virtqueue_kick in free_pkt</title>
<updated>2025-08-01T07:30:47+00:00</updated>
<author>
<name>Christian Speich</name>
<email>c.speich@avm.de</email>
</author>
<published>2025-07-24T12:29:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d1b4bfc98441663de1388bff5043b7a9351c8c5a'/>
<id>d1b4bfc98441663de1388bff5043b7a9351c8c5a</id>
<content type='text'>
Every virtqueue_add must eventually be followed by virtqueue_kick for to
properly notify the peer that new buffers have been put into the queue.

This is currently missing for virtio-net and may result in non-working
network when the host has depleted the rx buffers and waits for new
buffers. Depending on the host it may busy poll on the virtio queue or
wait for the kick. Qemu does the latter and may break.

Signed-off-by: Christian Speich &lt;c.speich@avm.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Every virtqueue_add must eventually be followed by virtqueue_kick for to
properly notify the peer that new buffers have been put into the queue.

This is currently missing for virtio-net and may result in non-working
network when the host has depleted the rx buffers and waits for new
buffers. Depending on the host it may busy poll on the virtio queue or
wait for the kick. Qemu does the latter and may break.

Signed-off-by: Christian Speich &lt;c.speich@avm.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>global: Cleanup usage of "ETH_ALEN"</title>
<updated>2025-06-02T23:26:16+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-05-21T22:51:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=824f8f52a1e44f6d281d3f89f23b3e85824a34fb'/>
<id>824f8f52a1e44f6d281d3f89f23b3e85824a34fb</id>
<content type='text'>
The value of "ETH_ALEN" is defined to 6 in &lt;linux/if_ether.h&gt;. This file
is included in &lt;net.h&gt;. In the places where we had ETH_ALEN but no
direct include of &lt;net.h&gt;, add &lt;linux/if_ether.h&gt;. In the places where
we had a custom name used, make use of ETH_ALEN instead.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The value of "ETH_ALEN" is defined to 6 in &lt;linux/if_ether.h&gt;. This file
is included in &lt;net.h&gt;. In the places where we had ETH_ALEN but no
direct include of &lt;net.h&gt;, add &lt;linux/if_ether.h&gt;. In the places where
we had a custom name used, make use of ETH_ALEN instead.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>blk: Make block subsystems select BLK</title>
<updated>2025-01-21T01:26:54+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-01-15T01:22:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a72fa7f2fee76b65c34ec1299334fef4f98aee50'/>
<id>a72fa7f2fee76b65c34ec1299334fef4f98aee50</id>
<content type='text'>
The BLK symbol has a few meanings, one of which is that it controls the
driver model portion of a "block device". Rather than having this hidden
symbol be "default y if ..." it should be select'd by the various block
subsystems. Symbols such as PVBLOCK which already select'd BLK are
unchanged".

Reviewed-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Reviewed-by: Quentin Schulz &lt;quentin.schulz@cherry.de&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The BLK symbol has a few meanings, one of which is that it controls the
driver model portion of a "block device". Rather than having this hidden
symbol be "default y if ..." it should be select'd by the various block
subsystems. Symbols such as PVBLOCK which already select'd BLK are
unchanged".

Reviewed-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Reviewed-by: Quentin Schulz &lt;quentin.schulz@cherry.de&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
