[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] virtio-ccw: commands on revision-less devices
From: |
Cornelia Huck |
Subject: |
Re: [PATCH] virtio-ccw: commands on revision-less devices |
Date: |
Fri, 19 Feb 2021 18:01:29 +0100 |
On Fri, 19 Feb 2021 12:21:36 +0100
Cornelia Huck <cohuck@redhat.com> 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?
Queued now with this description.
- Re: [PATCH] virtio-ccw: commands on revision-less devices, (continued)
Re: [PATCH] virtio-ccw: commands on revision-less devices, Cornelia Huck, 2021/02/19