On Thu, Oct 29, 2026 at 12:23:55AM +0100, Kevin Wolf wrote:
> QEMU has allowed the user to specify serials of arbitrary length for
> virtio-blk devices, even though the virtio-blk protocol can only
> communicate 20 characters of the serial to the guest. This means that a
> longer serial number on the command line is silently truncated to 20
> characters from the guest perspective.
> 
> As a first step to fix this, deprecate the silent truncation and turn it
> into a warning; we can later make this a hard error. While touching
> GET_ID, let's make it more spec compliant and clean up the internal
> state.
> 
> Another part is planned that will actually enable users to use longer
> serials and additional device identifiers. This will need spec changes
> and would take more time than we have until the QEMU 11.2 freeze anyway,
> so I'll address this later. For now, the important thing is to get the
> deprecation period started.
> 
> Kevin Wolf (5):
>   virtio-blk: Implement full NUL padding for GET_ID
>   virtio-blk-test: Add a basic GET_ID test case
>   virtio-blk: Deprecate silent truncation of serial
>   virtio-blk: Represent truncated serial in qdev property
>   virtio-blk-test: Test truncated serial
> 
>  docs/about/deprecated.rst     | 13 +++++
>  hw/block/virtio-blk.c         | 24 +++++++--
>  tests/qtest/virtio-blk-test.c | 92 +++++++++++++++++++++++++++++++++++
>  3 files changed, 125 insertions(+), 4 deletions(-)

Aside from the comments I've sent:

Reviewed-by: Stefan Hajnoczi <[email protected]>

Reply via email to