Skip to content
  • Cornelia Huck's avatar
    151fcdfd
    virtio-ccw: commands on revision-less devices · 151fcdfd
    Cornelia Huck authored
    
    
    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: default avatarCornelia Huck <cohuck@redhat.com>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Acked-by: default avatarHalil Pasic <pasic@linux.ibm.com>
    Message-Id: <20210216111830.1087847-1-cohuck@redhat.com>
    151fcdfd
    virtio-ccw: commands on revision-less devices
    Cornelia Huck authored
    
    
    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: default avatarCornelia Huck <cohuck@redhat.com>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Acked-by: default avatarHalil Pasic <pasic@linux.ibm.com>
    Message-Id: <20210216111830.1087847-1-cohuck@redhat.com>
Loading