Skip to content

Commit e1f17f8

Browse files
Tony Krowiakhcahca
authored andcommitted
s390/vfio-ap: handle queue state change in progress on reset
A new APQSW response code (0xA) indicating the designated queue is in the process of being bound or associated to a configuration may be returned from the PQAP(ZAPQ) command. This patch introduces code that will verify when the PQAP(ZAPQ) command can be re-issued after receiving response code 0xA. Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com> Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com> Acked-by: Halil Pasic <pasic@linux.ibm.com> Tested-by: Viktor Mihajlovski <mihajlov@linux.ibm.com> Link: https://lore.kernel.org/r/20230815184333.6554-9-akrowiak@linux.ibm.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent 9261f04 commit e1f17f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/s390/crypto/vfio_ap_ops.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,8 @@ static void apq_reset_check(struct work_struct *reset_work)
16471647
status.irq_enabled);
16481648
} else {
16491649
if (q->reset_status.response_code == AP_RESPONSE_RESET_IN_PROGRESS ||
1650-
q->reset_status.response_code == AP_RESPONSE_BUSY) {
1650+
q->reset_status.response_code == AP_RESPONSE_BUSY ||
1651+
q->reset_status.response_code == AP_RESPONSE_STATE_CHANGE_IN_PROGRESS) {
16511652
status = ap_zapq(q->apqn, 0);
16521653
memcpy(&q->reset_status, &status, sizeof(status));
16531654
continue;
@@ -1679,6 +1680,7 @@ static void vfio_ap_mdev_reset_queue(struct vfio_ap_queue *q)
16791680
case AP_RESPONSE_NORMAL:
16801681
case AP_RESPONSE_RESET_IN_PROGRESS:
16811682
case AP_RESPONSE_BUSY:
1683+
case AP_RESPONSE_STATE_CHANGE_IN_PROGRESS:
16821684
/*
16831685
* Let's verify whether the ZAPQ completed successfully on a work queue.
16841686
*/

0 commit comments

Comments
 (0)