[PATCH 0/5] s390/vfio-ap: Fixes for queue reset and AQIC handling

From: Jason J. Herne

Date: Thu Dec 03 2026 - 16:45:54 EST


This is a bugfix series to address problems found during ai lead code review.
Its focus is primarily reset & data security related.

Summary of changes:
- Patch 1: Prevent passing unreset, checkstopped, or deconfigured queues
through to guests so we don't risk leaking sensitive leftover data.
- Patch 2: Bound the queue reset verification loop (2s timeout) to avoid
infinite hangs if resets fail to complete (rare or impossible).
- Patch 3: Hold a private page reference on unconfirmed resets to satisfy
VFIO DMA unmapping while preventing page reuse/corruption by hardware.
- Patch 4: Clear dangling matrix_mdev references and clean up AQIC resources
for filtered queues during adapter/domain unassignment.
- Patch 5: Fix resource handling and state tracking for rejected or
non-NORMAL AQIC enable requests.


Jason J. Herne (5):
s390/vfio-ap: Prevent passing unreset queues
s390/vfio-ap: bound the wait for queue reset verification
s390/vfio-ap: Hold a private NIB page reference when a reset is
unconfirmed
s390/vfio-ap: clear matrix_mdev link for queues not reset on unassign
s390/vfio-ap: Fix resource handling for rejected AQIC enable requests

drivers/s390/crypto/vfio_ap_ops.c | 140 +++++++++++++++++++++-----
drivers/s390/crypto/vfio_ap_private.h | 2 +
2 files changed, 119 insertions(+), 23 deletions(-)

--
2.56.1