mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] dmaengine: idxd: No shared wqs without shared wq support
@ 2026-11-30  7:13 Fei Yu
  2026-11-30  7:13 ` [PATCH 1/2] dmaengine: idxd: Keep wqs dedicated " Fei Yu
  2026-11-30  7:13 ` [PATCH 2/2] dmaengine: idxd: Reject shared wq mode " Fei Yu
  0 siblings, 2 replies; 3+ messages in thread
From: Fei Yu @ 2026-11-30  7:13 UTC (permalink / raw)
  To: Vinod Koul, dmaengine
  Cc: Vinicius Costa Gomes, Dave Jiang, Frank Li, Andy Shevchenko,
	linux-kernel

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@intel.com

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-30  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30  7:13 [PATCH 0/2] dmaengine: idxd: No shared wqs without shared wq support Fei Yu
2026-11-30  7:13 ` [PATCH 1/2] dmaengine: idxd: Keep wqs dedicated " Fei Yu
2026-11-30  7:13 ` [PATCH 2/2] dmaengine: idxd: Reject shared wq mode " Fei Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®