f53b033e4c
Revert the control and flag bits in the subchannel status word in case the SSCH operation fails with non-zero CC (ditto for CSCH and HSCH). According to POPS, the control and flag bits are only changed if SSCH, CSCH, and HSCH return CC 0, and no other action should be taken otherwise. In order to simulate that after the fact, the bits need to be reverted on non-zero CC. While the do_subchannel_work logic for virtual (virtio) devices will return condition code 0, passthrough (vfio) devices may encounter errors from either the host kernel or real hardware that need to be accounted for after this point. This includes restoring the state of the Subchannel Status Word to reflect the subchannel, as these bits would not be set in the event of a non-zero condition code from the affected instructions. Experimentation has shown that a failure on a START SUBCHANNEL (SSCH) to a passthrough device would leave the subchannel with the START PENDING activity control bit set, thus blocking subsequent SSCH operations in css_do_ssch() until some form of error recovery was undertaken since no interrupt would be expected. Signed-off-by: Peter Jin <pjin@linux.ibm.com> Message-Id: <20221027212341.2904795-1-pjin@linux.ibm.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> [thuth: Updated the commit description to Eric's suggestion] Signed-off-by: Thomas Huth <thuth@redhat.com> |
||
---|---|---|
.. | ||
3270-ccw.c | ||
ap-bridge.c | ||
ap-device.c | ||
ccw-device.c | ||
ccw-device.h | ||
css-bridge.c | ||
css.c | ||
event-facility.c | ||
ipl.c | ||
ipl.h | ||
Kconfig | ||
meson.build | ||
pv.c | ||
s390-ccw.c | ||
s390-pci-bus.c | ||
s390-pci-inst.c | ||
s390-pci-kvm.c | ||
s390-pci-vfio.c | ||
s390-skeys-kvm.c | ||
s390-skeys.c | ||
s390-stattrib-kvm.c | ||
s390-stattrib.c | ||
s390-virtio-ccw.c | ||
s390-virtio-hcall.c | ||
s390-virtio-hcall.h | ||
sclp.c | ||
sclpcpu.c | ||
sclpquiesce.c | ||
tod-kvm.c | ||
tod-tcg.c | ||
tod.c | ||
trace-events | ||
trace.h | ||
vhost-scsi-ccw.c | ||
vhost-user-fs-ccw.c | ||
vhost-vsock-ccw.c | ||
virtio-ccw-9p.c | ||
virtio-ccw-balloon.c | ||
virtio-ccw-blk.c | ||
virtio-ccw-crypto.c | ||
virtio-ccw-gpu.c | ||
virtio-ccw-input.c | ||
virtio-ccw-net.c | ||
virtio-ccw-rng.c | ||
virtio-ccw-scsi.c | ||
virtio-ccw-serial.c | ||
virtio-ccw.c | ||
virtio-ccw.h |