• Harald Freudenberger's avatar
    s390/zcrypt: use new state UNBOUND during queue driver rebind · b1af7528
    Harald Freudenberger authored
    When an alternate driver (vfio-ap) has bound an ap queue and this
    binding is revised the ap queue device is in an intermittent
    state not bound to any driver. The internal state variable
    covered this with the state AP_STATE_BORKED which is also used to
    reflect broken devices. When now an ap bus scan runs such a
    device is destroyed and on the next scan reconstructed.
    
    So a stress test with high frequency switching the queue driver
    between the default and the vfio-ap driver hit this gap and the
    queue was removed until the next ap bus scan. This fix now
    introduces another state for the in-between condition for a queue
    momentary not bound to a driver and so the ap bus scan function
    skips this device instead of removing it.
    
    Also some very slight but maybe helpful debug feature messages
    come with this patch - in particular a message showing that a
    broken card/queue device will get removed.
    Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
    Reviewed-by: default avatarIngo Franzki <ifranzki@linux.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    b1af7528
ap_bus.h 9.67 KB