Skip to content

Add serial number support for virtio_blk, V4

john cooper kvm qemu-devel 1 version Applied

Status from this message: Thanks, applied with one subtraction:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2Add serial number support for virtio_blk, V4hw/virtio-blk.c hw/virtio-blk.h sysemu.h+66 -10 replies
2/2Add serial number support for virtio_blk, V4drivers/block/virtio_blk.c include/linux/virtio_blk.h+45 -34 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Add serial number support for virtio_blk, V4

[Rework of earlier patch to provide additional information in the response to an ATA identify request -- virtio_blk treats the data as opaque, content created by qemu's virtio-blk. Comments from Christoph also incorporated.]

This patch allows passing of a virtio_blk drive serial number from qemu into a guest's virtio_blk driver, and provides a means to access the serial number from a guest's userspace.

Equivalent functionality currently exists for IDE and SCSI, however it is not yet implemented for virtio. Scenarios exist where guest code relies on a unique drive serial number to correctly identify the machine environment in which it exists.

The following two patches implement the above:

qemu-vblk-serial-4.patch

which provides the qemu missing bits to interpret a '-drive .. serial=XYZ ..' flag, and:

virtio_blk-serial-4.patch

which extracts this information and makes it available to guest userspace via an HDIO_GET_IDENTITY ioctl, eg: 'hdparm -i /dev/vda'.

The above patches are relative to qemu-kvm.git and 2.6.29.3 respectively.

-john

Signature · 1 line
[email protected]