qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Thomas Huth <thuth@redhat.com>,
	qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] virtio-ccw: commands on revision-less devices
Date: Sun, 21 Feb 2021 06:48:42 -0500	[thread overview]
Message-ID: <20210221064835-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20210219122136.5d97e0bf.cohuck@redhat.com>

On Fri, Feb 19, 2021 at 12:21:36PM +0100, Cornelia Huck wrote:
> On Tue, 16 Feb 2021 12:18:30 +0100
> Cornelia Huck <cohuck@redhat.com> wrote:
> 
> > The virtio standard specifies that any non-transitional device must
> > reject commands prior to revision setting (which we do) and else
> > assume revision 0 (legacy) if the driver sends a non-revision-setting
> > command first. We neglected to do the latter.
> > 
> > Fortunately, nearly everything worked as intended anyway; the only
> > problem was not properly rejecting revision setting after some other
> > command had been issued. Easy to fix by setting revision to 0 if
> > we see a non-revision command on a legacy-capable revision-less
> > device.
> > 
> > Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> > ---
> >  hw/s390x/virtio-ccw.c | 21 ++++++++++++++-------
> >  1 file changed, 14 insertions(+), 7 deletions(-)
> 
> I now have:
> 
> Author: Cornelia Huck <cohuck@redhat.com>
> Date:   Tue Feb 16 12:18:30 2021 +0100
> 
>     virtio-ccw: commands on revision-less devices
>     
>     The virtio standard specifies that any non-transitional device must
>     reject commands prior to revision setting (which we do). Devices
>     that are transitional need to assume revision 0 (legacy) if the
>     driver sends a non-revision-setting command first in order to
>     support legacy drivers. We neglected to do the latter.
>     
>     Fortunately, nearly everything worked as intended anyway; the only
>     problem was not properly rejecting revision setting after some other
>     command had been issued. Easy to fix by setting revision to 0 if
>     we see a non-revision command on a legacy-capable revision-less
>     device.
>     
>     Found by code inspection, not observed in the wild.
>     
>     Signed-off-by: Cornelia Huck <cohuck@redhat.com>
>     Reviewed-by: Thomas Huth <thuth@redhat.com>
>     Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
>     Acked-by: Halil Pasic <pasic@linux.ibm.com>
>     Message-Id: <20210216111830.1087847-1-cohuck@redhat.com>
> 
> Any objections?

Acked-by: Michael S. Tsirkin <mst@redhat.com>



      parent reply	other threads:[~2021-02-21 11:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 11:18 [PATCH] virtio-ccw: commands on revision-less devices Cornelia Huck
2021-02-16 11:33 ` Thomas Huth
2021-02-16 11:40 ` Michael S. Tsirkin
2021-02-16 11:51   ` Cornelia Huck
2021-02-16 11:58     ` Michael S. Tsirkin
2021-02-16 14:19 ` Halil Pasic
2021-02-16 15:54   ` Cornelia Huck
2021-02-17 14:39     ` Halil Pasic
2021-02-18 13:51       ` Cornelia Huck
2021-02-18 18:51         ` Halil Pasic
2021-02-19 11:21 ` Cornelia Huck
2021-02-19 17:01   ` Cornelia Huck
2021-02-21 11:48   ` Michael S. Tsirkin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210221064835-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).