From: Fei Yu <fei.yu@intel.com>
To: Vinod Koul <vkoul@kernel.org>, dmaengine@vger.kernel.org
Cc: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Dave Jiang <dave.jiang@intel.com>, Frank Li <Frank.Li@kernel.org>,
Andy Shevchenko <andriy.shevchenko@intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] dmaengine: idxd: No shared wqs without shared wq support
Date: Mon, 30 Nov 2026 15:13:36 +0800 [thread overview]
Message-ID: <20261130071338.3120264-1-fei.yu@intel.com> (raw)
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
next reply other threads:[~2026-11-30 7:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 7:13 Fei Yu [this message]
2026-11-30 7:13 ` [PATCH 1/2] dmaengine: idxd: Keep wqs dedicated without shared wq support Fei Yu
2026-11-30 7:23 ` sashiko-bot
2026-11-30 16:30 ` Andy Shevchenko
2026-11-30 7:13 ` [PATCH 2/2] dmaengine: idxd: Reject shared wq mode " Fei Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130071338.3120264-1-fei.yu@intel.com \
--to=fei.yu@intel.com \
--cc=Frank.Li@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=dave.jiang@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vinicius.gomes@intel.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.