• Dong Jia Shi's avatar
    vfio: ccw: bypass bad idaw address when fetching IDAL ccws · 688c2953
    Dong Jia Shi authored
    We currently return the same error code (-EFAULT) to indicate two
    different error cases:
    1. a bug in vfio-ccw implementation has been found.
    2. a buggy channel program has been detected.
    
    This brings difficulty for userland program (specifically Qemu) to
    handle.
    
    Let's use -EFAULT to only indicate the first case. For the second
    case, we simply hand over the ccws to lower level for further
    handling.
    
    Notice:
    Once a bad idaw address is detected, the current behavior is to
    suppress the ssch. With this fix, the channel program will be
    accepted, and part of the channel program (the part ahead of
    the bad idaw) could possibly be executed by the device before
    I/O conclusion.
    Suggested-by: default avatarHalil Pasic <pasic@linux.vnet.ibm.com>
    Reviewed-by: default avatarPierre Morel <pmorel@linux.vnet.ibm.com>
    Signed-off-by: default avatarDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
    Message-Id: <20171011023822.42948-2-bjsdjshi@linux.vnet.ibm.com>
    Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
    688c2953
vfio_ccw_cp.c 19.6 KB