]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
accel/ivpu: Limit number of maximum contexts and doorbells per user
authorKarol Wachowski <karol.wachowski@linux.intel.com>
Mon, 2 Mar 2026 20:22:07 +0000 (21:22 +0100)
committerMaciej Falkowski <maciej.falkowski@linux.intel.com>
Tue, 3 Mar 2026 11:54:03 +0000 (12:54 +0100)
commit86a14330bf0598ce89177cebcc19e2cf810abf44
tree9d66576ef6036131e42213296749fdc0fe5ac48b
parent6716101ae42949e98ad4b9e71eeba08c055be410
accel/ivpu: Limit number of maximum contexts and doorbells per user

Implement per-user resource limits to prevent resource exhaustion.

Root users can allocate all available contexts (128) and doorbells
(255), while non-root users are limited to half of the available
resources (64 contexts and 127 doorbells respectively).

This prevents scenarios where a single user could monopolize NPU
resources and starve other users on multi-user systems.

Change doorbell ID and command queue ID allocation errors to debug
messages as those are user triggered.

Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Link: https://patch.msgid.link/20260302202207.469442-1-maciej.falkowski@linux.intel.com
drivers/accel/ivpu/ivpu_drv.c
drivers/accel/ivpu/ivpu_drv.h
drivers/accel/ivpu/ivpu_job.c