virtio-blk: deprecate SCSI passthrough
PATCH 1/1 virtio-blk: deprecate SCSI passthrough
The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough support. Deprecate this feature in QEMU too.
--- qemu-deprecated.texi | 11 +++++++++++ 1 file changed, 11 insertions(+)
qemu-deprecated.texi +11 -0
@@ -285,6 +285,17 @@ spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument. @section Device options +@subsection Emulated device options + +@subsubsection -device virtio-blk,scsi=on|off (since 5.0.0) + +The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature. VIRTIO 1.0 +and later do not support it because the virtio-scsi device was introduced for +full SCSI support. Use virtio-scsi instead when SCSI passthrough is required. + +Note this also applies to ``-device virtio-blk-pci,scsi=on|off'', which is an +alias. + @subsection Block device options @subsubsection "backing": "" (since 2.12.0)
Signature · 1 line
2.23.0
Quoted 21 lines · Stefan Hajnoczi
The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough support. Deprecate this feature in QEMU too.
Signed-off-by Stefan Hajnoczi <[email protected]>--- qemu-deprecated.texi | 11 +++++++++++ 1 file changed, 11 insertions(+)qemu-deprecated.texi +4
-0@@ -285,6 +285,17 @@ spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument. @section Device options +@subsection Emulated device options + +@subsubsection -device virtio-blk,scsi=on|off (since 5.0.0) +
qemu-deprecated.texi spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument. · line 301
Quoted 10 lines
qemu-deprecated.texi +7
-0+The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature. VIRTIO 1.0 +and later do not support it because the virtio-scsi device was introduced for +full SCSI support. Use virtio-scsi instead when SCSI passthrough is required. + +Note this also applies to ``-device virtio-blk-pci,scsi=on|off'', which is an +alias. + @subsection Block device options @subsubsection "backing": "" (since 2.12.0)
Quoted 30 lines · Paolo Bonzini
Quoted 29 lines · Stefan Hajnoczi
The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough support. Deprecate this feature in QEMU too.
Signed-off-by Stefan Hajnoczi <[email protected]>--- qemu-deprecated.texi | 11 +++++++++++ 1 file changed, 11 insertions(+)qemu-deprecated.texi +11
-0@@ -285,6 +285,17 @@ spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument. @section Device options +@subsection Emulated device options + +@subsubsection -device virtio-blk,scsi=on|off (since 5.0.0) + +The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature. VIRTIO 1.0 +and later do not support it because the virtio-scsi device was introduced for +full SCSI support. Use virtio-scsi instead when SCSI passthrough is required. + +Note this also applies to ``-device virtio-blk-pci,scsi=on|off'', which is an +alias. + @subsection Block device options
Quoted 4 lines
qemu-deprecated.texi spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument. · line 301
Quoted 2 lines
qemu-deprecated.texi +0
-0@subsubsection "backing": "" (since 2.12.0)Reviewed-by Paolo Bonzini <[email protected]>
Libvirt still allows and exposes this configuration:
<disk type='block' device='lun'>
<driver name='qemu' type='qcow2'/>
<source dev='/dev/sdfake2'/>
<target dev='vdb' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>which results into the following command line:
-drive file=/dev/sdfake2,format=qcow2,if=none,id=drive-virtio-disk1 \
-device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,\
id=virtio-disk1
In this case I don't see any possibility how to fix it since it requires change of controller.
I don't think that we've also added interlocks for this with VIRTIO 1.0
Quoted 51 lines · Peter Krempa
Quoted 30 lines · Paolo Bonzini
Quoted 29 lines · Stefan Hajnoczi
The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough support. Deprecate this feature in QEMU too.
Signed-off-by Stefan Hajnoczi <[email protected]>--- qemu-deprecated.texi | 11 +++++++++++ 1 file changed, 11 insertions(+)qemu-deprecated.texi +11
-0@@ -285,6 +285,17 @@ spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument. @section Device options +@subsection Emulated device options + +@subsubsection -device virtio-blk,scsi=on|off (since 5.0.0) + +The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature. VIRTIO 1.0 +and later do not support it because the virtio-scsi device was introduced for +full SCSI support. Use virtio-scsi instead when SCSI passthrough is required. + +Note this also applies to ``-device virtio-blk-pci,scsi=on|off'', which is an +alias. + @subsection Block device optionsQuoted 4 lines
qemu-deprecated.texi spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument. · line 301
Quoted 2 lines
qemu-deprecated.texi +0
-0@subsubsection "backing": "" (since 2.12.0)Reviewed-by Paolo Bonzini <[email protected]>Libvirt still allows and exposes this configuration:
<disk type='block' device='lun'> <driver name='qemu' type='qcow2'/> <source dev='/dev/sdfake2'/> <target dev='vdb' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk>which results into the following command line:
(quoted diff) +0
-2-drive file=/dev/sdfake2,format=qcow2,if=none,id=drive-virtio-disk1 \ -device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,\id=virtio-disk1
Quoted 2 lines
In this case I don't see any possibility how to fix it since it requires change of controller.
I don't think it really matters. QEMU is deprecating it with no seemless direct replacement, so I don't think libvirt needs to be concerned. The feature simply becomes unsupported.
At the very most we need to check if it exists before using it, but even that's just a nice to have which results in a slightly prettier error message.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 7 lines · Daniel P. Berrangé
I don't think it really matters. QEMU is deprecating it with no seemless direct replacement, so I don't think libvirt needs to be concerned. The feature simply becomes unsupported.
At the very most we need to check if it exists before using it, but even that's just a nice to have which results in a slightly prettier error message.
Libvirt right now assumes that a QEMU without the scsi property defaults to "on", but if the oldest supported QEMU version is 1.5.3 then it already has the property. So you can just give an error if there is no scsi property and device='lun'.
Paolo
Quoted 4 lines · Stefan Hajnoczi
The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough support. Deprecate this feature in QEMU too.
Signed-off-by Stefan Hajnoczi <[email protected]>
Fine with me as the original author:
Quoted 16 lines · Stefan Hajnoczi
The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough support. Deprecate this feature in QEMU too.
Signed-off-by Stefan Hajnoczi <[email protected]>--- qemu-deprecated.texi | 11 +++++++++++ 1 file changed, 11 insertions(+)qemu-deprecated.texi +0
-0@@ -285,6 +285,17 @@ spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument. @section Device options
qemu-deprecated.texi spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument. · line 297
Quoted 10 lines
qemu-deprecated.texi +10
-0+@subsection Emulated device options + +@subsubsection -device virtio-blk,scsi=on|off (since 5.0.0) + +The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature. VIRTIO 1.0 +and later do not support it because the virtio-scsi device was introduced for +full SCSI support. Use virtio-scsi instead when SCSI passthrough is required. + +Note this also applies to ``-device virtio-blk-pci,scsi=on|off'', which is an +alias.
... and "-device virtio-blk-ccw,scsi=on|off". With that added:
Stefan Hajnoczi
AppliedQuoted 7 lines · Stefan Hajnoczi
The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough support. Deprecate this feature in QEMU too.
Signed-off-by Stefan Hajnoczi <[email protected]>--- qemu-deprecated.texi | 11 +++++++++++ 1 file changed, 11 insertions(+)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan