mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
dmaengine: idxd: Narrow the restriction on BATCH to ver. 1 only
Allow BATCH operations to be submitted and the capability to be exposed for DSA version 2 (or later) devices. DSA version 2 devices allow safe submission of BATCH operations. Signed-off-by: Anil Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reported-by: Yi Sun <yi.sun@intel.com> Tested-by: Yi Sun <yi.sun@intel.com> Link: https://lore.kernel.org/r/20250312221511.277954-1-vinicius.gomes@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
committed by
Vinod Koul
parent
fd447415e7
commit
31f04b5371
@@ -441,10 +441,12 @@ static int idxd_submit_user_descriptor(struct idxd_user_context *ctx,
|
||||
* DSA devices are capable of indirect ("batch") command submission.
|
||||
* On devices where direct user submissions are not safe, we cannot
|
||||
* allow this since there is no good way for us to verify these
|
||||
* indirect commands.
|
||||
* indirect commands. Narrow the restriction of operations with the
|
||||
* BATCH opcode to only DSA version 1 devices.
|
||||
*/
|
||||
if (is_dsa_dev(idxd_dev) && descriptor.opcode == DSA_OPCODE_BATCH &&
|
||||
!wq->idxd->user_submission_safe)
|
||||
wq->idxd->hw.version == DEVICE_VERSION_1 &&
|
||||
!wq->idxd->user_submission_safe)
|
||||
return -EINVAL;
|
||||
/*
|
||||
* As per the programming specification, the completion address must be
|
||||
|
||||
Reference in New Issue
Block a user