qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio-blk: deprecate SCSI passthrough
@ 2019-12-13 14:46 Stefan Hajnoczi
  2019-12-13 14:56 ` Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2019-12-13 14:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Michael S. Tsirkin, libvir-list,
	Stefan Hajnoczi, Paolo Bonzini, Christoph Hellwig

The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough
support.  Deprecate this feature in QEMU too.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 qemu-deprecated.texi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index 4b4b7425ac..ef94d497da 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -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)
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] virtio-blk: deprecate SCSI passthrough
  2019-12-13 14:46 [PATCH] virtio-blk: deprecate SCSI passthrough Stefan Hajnoczi
@ 2019-12-13 14:56 ` Paolo Bonzini
  2019-12-13 15:07   ` [libvirt] " Peter Krempa
  2019-12-13 14:56 ` Christoph Hellwig
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2019-12-13 14:56 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel
  Cc: Kevin Wolf, libvir-list, Christoph Hellwig, qemu-block,
	Michael S. Tsirkin

On 13/12/19 15:46, Stefan Hajnoczi wrote:
> The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough
> support.  Deprecate this feature in QEMU too.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  qemu-deprecated.texi | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
> index 4b4b7425ac..ef94d497da 100644
> --- a/qemu-deprecated.texi
> +++ b/qemu-deprecated.texi
> @@ -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)
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] virtio-blk: deprecate SCSI passthrough
  2019-12-13 14:46 [PATCH] virtio-blk: deprecate SCSI passthrough Stefan Hajnoczi
  2019-12-13 14:56 ` Paolo Bonzini
@ 2019-12-13 14:56 ` Christoph Hellwig
  2019-12-14 12:21 ` Thomas Huth
  2019-12-17 10:38 ` Stefan Hajnoczi
  3 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2019-12-13 14:56 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Kevin Wolf, qemu-block, Michael S. Tsirkin, libvir-list,
	qemu-devel, Paolo Bonzini, Christoph Hellwig

On Fri, Dec 13, 2019 at 02:46:26PM +0000, Stefan Hajnoczi wrote:
> The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough
> support.  Deprecate this feature in QEMU too.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

Fine with me as the original author:

Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [libvirt] [PATCH] virtio-blk: deprecate SCSI passthrough
  2019-12-13 14:56 ` Paolo Bonzini
@ 2019-12-13 15:07   ` Peter Krempa
  2019-12-13 15:10     ` Daniel P. Berrangé
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Krempa @ 2019-12-13 15:07 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Kevin Wolf, qemu-block, Michael S. Tsirkin, libvir-list,
	qemu-devel, Stefan Hajnoczi, Christoph Hellwig

On Fri, Dec 13, 2019 at 15:56:08 +0100, Paolo Bonzini wrote:
> On 13/12/19 15:46, Stefan Hajnoczi wrote:
> > The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough
> > support.  Deprecate this feature in QEMU too.
> > 
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > ---
> >  qemu-deprecated.texi | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
> > index 4b4b7425ac..ef94d497da 100644
> > --- a/qemu-deprecated.texi
> > +++ b/qemu-deprecated.texi
> > @@ -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)
> > 
> 
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [libvirt] [PATCH] virtio-blk: deprecate SCSI passthrough
  2019-12-13 15:07   ` [libvirt] " Peter Krempa
@ 2019-12-13 15:10     ` Daniel P. Berrangé
  2019-12-13 15:25       ` Paolo Bonzini
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel P. Berrangé @ 2019-12-13 15:10 UTC (permalink / raw)
  To: Peter Krempa
  Cc: Kevin Wolf, qemu-block, Michael S. Tsirkin, libvir-list,
	qemu-devel, Stefan Hajnoczi, Paolo Bonzini, Christoph Hellwig

On Fri, Dec 13, 2019 at 04:07:06PM +0100, Peter Krempa wrote:
> On Fri, Dec 13, 2019 at 15:56:08 +0100, Paolo Bonzini wrote:
> > On 13/12/19 15:46, Stefan Hajnoczi wrote:
> > > The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough
> > > support.  Deprecate this feature in QEMU too.
> > > 
> > > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > > ---
> > >  qemu-deprecated.texi | 11 +++++++++++
> > >  1 file changed, 11 insertions(+)
> > > 
> > > diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
> > > index 4b4b7425ac..ef94d497da 100644
> > > --- a/qemu-deprecated.texi
> > > +++ b/qemu-deprecated.texi
> > > @@ -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)
> > > 
> > 
> > Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> 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 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
-- 
|: 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 :|



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [libvirt] [PATCH] virtio-blk: deprecate SCSI passthrough
  2019-12-13 15:10     ` Daniel P. Berrangé
@ 2019-12-13 15:25       ` Paolo Bonzini
  0 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2019-12-13 15:25 UTC (permalink / raw)
  To: Daniel P. Berrangé, Peter Krempa
  Cc: Kevin Wolf, qemu-block, Michael S. Tsirkin, libvir-list,
	qemu-devel, Stefan Hajnoczi, Christoph Hellwig

On 13/12/19 16:10, Daniel P. Berrangé wrote:
> 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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] virtio-blk: deprecate SCSI passthrough
  2019-12-13 14:46 [PATCH] virtio-blk: deprecate SCSI passthrough Stefan Hajnoczi
  2019-12-13 14:56 ` Paolo Bonzini
  2019-12-13 14:56 ` Christoph Hellwig
@ 2019-12-14 12:21 ` Thomas Huth
  2019-12-17 10:38 ` Stefan Hajnoczi
  3 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2019-12-14 12:21 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel
  Cc: Kevin Wolf, qemu-block, Michael S. Tsirkin, libvir-list,
	Paolo Bonzini, Christoph Hellwig

On 13/12/2019 15.46, Stefan Hajnoczi wrote:
> The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough
> support.  Deprecate this feature in QEMU too.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  qemu-deprecated.texi | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
> index 4b4b7425ac..ef94d497da 100644
> --- a/qemu-deprecated.texi
> +++ b/qemu-deprecated.texi
> @@ -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.

... and "-device virtio-blk-ccw,scsi=on|off". With that added:

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] virtio-blk: deprecate SCSI passthrough
  2019-12-13 14:46 [PATCH] virtio-blk: deprecate SCSI passthrough Stefan Hajnoczi
                   ` (2 preceding siblings ...)
  2019-12-14 12:21 ` Thomas Huth
@ 2019-12-17 10:38 ` Stefan Hajnoczi
  3 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2019-12-17 10:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Michael S. Tsirkin, libvir-list,
	Paolo Bonzini, Christoph Hellwig

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]

On Fri, Dec 13, 2019 at 02:46:26PM +0000, Stefan Hajnoczi wrote:
> The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough
> support.  Deprecate this feature in QEMU too.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  qemu-deprecated.texi | 11 +++++++++++
>  1 file changed, 11 insertions(+)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-17 10:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13 14:46 [PATCH] virtio-blk: deprecate SCSI passthrough Stefan Hajnoczi
2019-12-13 14:56 ` Paolo Bonzini
2019-12-13 15:07   ` [libvirt] " Peter Krempa
2019-12-13 15:10     ` Daniel P. Berrangé
2019-12-13 15:25       ` Paolo Bonzini
2019-12-13 14:56 ` Christoph Hellwig
2019-12-14 12:21 ` Thomas Huth
2019-12-17 10:38 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).