qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fixup! virtio-blk: fail get_features when both scsi and 1.0 were set
@ 2015-07-27 11:41 Paolo Bonzini
  2015-07-27 12:24 ` Cornelia Huck
  2015-07-29  8:42 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2015-07-27 11:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: cornelia.huck, pbonzini, Jason Wang, mst

Tweak the error message so that it does not mention SCSI passthrough.  That
can be confusing because you can have scsi=on even for file-backed image,
which obviously do not support SCSI passthrough at the block layer level.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/block/virtio-blk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 9acbc3a..7bed3f0 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -734,7 +734,7 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features,
     virtio_clear_feature(&features, VIRTIO_F_ANY_LAYOUT);
     if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) {
         if (s->conf.scsi) {
-            error_setg(errp, "Virtio 1.0 does not support scsi passthrough!");
+            error_setg(errp, "Please set scsi=off for virtio-blk devices in order to use virtio 1.0");
             return 0;
         }
         virtio_add_feature(&features, VIRTIO_F_ANY_LAYOUT);
-- 
2.1.4

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

* Re: [Qemu-devel] [PATCH] fixup! virtio-blk: fail get_features when both scsi and 1.0 were set
  2015-07-27 11:41 [Qemu-devel] [PATCH] fixup! virtio-blk: fail get_features when both scsi and 1.0 were set Paolo Bonzini
@ 2015-07-27 12:24 ` Cornelia Huck
  2015-07-29  8:42 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Cornelia Huck @ 2015-07-27 12:24 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Jason Wang, qemu-devel, mst

On Mon, 27 Jul 2015 13:41:32 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> Tweak the error message so that it does not mention SCSI passthrough.  That
> can be confusing because you can have scsi=on even for file-backed image,
> which obviously do not support SCSI passthrough at the block layer level.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/block/virtio-blk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
> index 9acbc3a..7bed3f0 100644
> --- a/hw/block/virtio-blk.c
> +++ b/hw/block/virtio-blk.c
> @@ -734,7 +734,7 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features,
>      virtio_clear_feature(&features, VIRTIO_F_ANY_LAYOUT);
>      if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) {
>          if (s->conf.scsi) {
> -            error_setg(errp, "Virtio 1.0 does not support scsi passthrough!");
> +            error_setg(errp, "Please set scsi=off for virtio-blk devices in order to use virtio 1.0");
>              return 0;
>          }
>          virtio_add_feature(&features, VIRTIO_F_ANY_LAYOUT);

I like that message much better.

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

* Re: [Qemu-devel] [PATCH] fixup! virtio-blk: fail get_features when both scsi and 1.0 were set
  2015-07-27 11:41 [Qemu-devel] [PATCH] fixup! virtio-blk: fail get_features when both scsi and 1.0 were set Paolo Bonzini
  2015-07-27 12:24 ` Cornelia Huck
@ 2015-07-29  8:42 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2015-07-29  8:42 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: cornelia.huck, Jason Wang, qemu-devel, mst

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

On Mon, Jul 27, 2015 at 01:41:32PM +0200, Paolo Bonzini wrote:
> Tweak the error message so that it does not mention SCSI passthrough.  That
> can be confusing because you can have scsi=on even for file-backed image,
> which obviously do not support SCSI passthrough at the block layer level.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/block/virtio-blk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
> index 9acbc3a..7bed3f0 100644
> --- a/hw/block/virtio-blk.c
> +++ b/hw/block/virtio-blk.c
> @@ -734,7 +734,7 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features,
>      virtio_clear_feature(&features, VIRTIO_F_ANY_LAYOUT);
>      if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) {
>          if (s->conf.scsi) {
> -            error_setg(errp, "Virtio 1.0 does not support scsi passthrough!");
> +            error_setg(errp, "Please set scsi=off for virtio-blk devices in order to use virtio 1.0");
>              return 0;
>          }
>          virtio_add_feature(&features, VIRTIO_F_ANY_LAYOUT);

For the record, this patch has been merged as part of:

  commit efb8206ca7f19f5a6ece1f2851a73a29de309b1e
  Author: Jason Wang <jasowang@redhat.com>
  Date:   Mon Jul 27 17:49:20 2015 +0800

    virtio-blk: fail get_features when both scsi and 1.0 were set

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

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

end of thread, other threads:[~2015-07-29  8:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 11:41 [Qemu-devel] [PATCH] fixup! virtio-blk: fail get_features when both scsi and 1.0 were set Paolo Bonzini
2015-07-27 12:24 ` Cornelia Huck
2015-07-29  8:42 ` 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).