[PATCH 0/2] dmaengine: idxd: No shared wqs without shared wq support

From: Fei Yu

Date: Mon Nov 30 2026 - 02:07:56 EST


A wq is shared unless WQ_FLAG_DEDICATED is set, so on a device without
shared wq support (no ENQCMD, or no PASID) every wq starts out in a
mode the device cannot use, and a wq goes back to that mode when it is
disabled. Since a disabled wq keeps its group, the next device
configuration fails; on the Nova Lake IAA, the restore after an FLR
halts the device once iaa_crypto has released its wq.

Patch 1 makes dedicated the mode of every wq on such devices, at setup
and after disable (the fix, for stable). Patch 2 rejects "shared" in
the wq mode attribute there, so the invalid state cannot be set from
userspace either; it is not needed for stable.

Tested on Nova Lake (v7.3.4 based kernel, idxd and iaa_crypto built
out of tree with this series): module reload, PCI unbind/bind and FLR
10 times each with iaa_crypto bound, all pass. With wq0.0 released by
iaa_crypto, an FLR no longer halts the device ("HALT: iax0 config
fails" before), iax0 stays enabled and wq0.0 stays dedicated.
"echo shared > wq0.0/mode" fails with EOPNOTSUPP.

The series is based on dmaengine/next and also applies on top of
"dmaengine: idxd: More error handling fixes" v2 [1].

[1] https://lore.kernel.org/r/20261125-wt-idxd-fixes-v2-0-25a4691dfb9e@xxxxxxxxx

Fei Yu (2):
dmaengine: idxd: Keep wqs dedicated without shared wq support
dmaengine: idxd: Reject shared wq mode without shared wq support

drivers/dma/idxd/device.c | 9 +++++++++
drivers/dma/idxd/idxd.h | 13 +++++++++++++
drivers/dma/idxd/init.c | 3 +++
drivers/dma/idxd/sysfs.c | 2 ++
4 files changed, 27 insertions(+)


base-commit: 2e02fb103be058cf8b2fb24112a74a2715e090f0
--
2.53.0