<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/accel, branch v6.12.53</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.53</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.53'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-09T16:58:14+00:00</updated>
<entry>
<title>accel/ivpu: Prevent recovery work from being queued during device removal</title>
<updated>2025-09-09T16:58:14+00:00</updated>
<author>
<name>Karol Wachowski</name>
<email>karol.wachowski@intel.com</email>
</author>
<published>2025-08-08T11:09:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=54c49eca38dbd06913a696f6d7610937dcfad226'/>
<id>urn:sha1:54c49eca38dbd06913a696f6d7610937dcfad226</id>
<content type='text'>
commit 69a79ada8eb034ce016b5b78fb7d08d8687223de upstream.

Use disable_work_sync() instead of cancel_work_sync() in ivpu_dev_fini()
to ensure that no new recovery work items can be queued after device
removal has started. Previously, recovery work could be scheduled even
after canceling existing work, potentially leading to use-after-free
bugs if recovery accessed freed resources.

Rename ivpu_pm_cancel_recovery() to ivpu_pm_disable_recovery() to better
reflect its new behavior.

Fixes: 58cde80f45a2 ("accel/ivpu: Use dedicated work for job timeout detection")
Cc: stable@vger.kernel.org # v6.8+
Signed-off-by: Karol Wachowski &lt;karol.wachowski@intel.com&gt;
Reviewed-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250808110939.328366-1-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>accel/habanalabs/gaudi2: Use kvfree() for memory allocated with kvcalloc()</title>
<updated>2025-08-28T14:31:06+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@toblux.com</email>
</author>
<published>2024-08-20T23:10:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1414220d5b5ed864691dd272a90164d93399a486'/>
<id>urn:sha1:1414220d5b5ed864691dd272a90164d93399a486</id>
<content type='text'>
commit a44458dfd5bc0c79c6739c3f4c658361d3a5126b upstream.

Use kvfree() to fix the following Coccinelle/coccicheck warning reported
by kfree_mismatch.cocci:

  WARNING kvmalloc is used to allocate this memory at line 10398

Fixes: f728c17fc97a ("accel/habanalabs/gaudi2: move HMMU page tables to device memory")
Reported-by: Qianfeng Rong &lt;rongqianfeng@vivo.com&gt;
Closes: https://patch.msgid.link/20250808085530.233737-1-rongqianfeng@vivo.com
Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
[lukas: acknowledge Qianfeng, adjust Thorsten's domain, add Fixes tag]
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Reviewed-by: Tomer Tayar &lt;ttayar@habana.ai&gt;
Cc: stable@vger.kernel.org  # v6.9+
Link: https://patch.msgid.link/20240820231028.136126-1-thorsten.blum@toblux.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: fix UAF in export_dmabuf()</title>
<updated>2025-08-20T16:30:17+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-07-12T05:02:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c07886761fd6251db6938d4e747002e3d150d231'/>
<id>urn:sha1:c07886761fd6251db6938d4e747002e3d150d231</id>
<content type='text'>
[ Upstream commit 33927f3d0ecdcff06326d6e4edb6166aed42811c ]

As soon as we'd inserted a file reference into descriptor table, another
thread could close it.  That's fine for the case when all we are doing is
returning that descriptor to userland (it's a race, but it's a userland
race and there's nothing the kernel can do about it).  However, if we
follow fd_install() with any kind of access to objects that would be
destroyed on close (be it the struct file itself or anything destroyed
by its -&gt;release()), we have a UAF.

dma_buf_fd() is a combination of reserving a descriptor and fd_install().
habanalabs export_dmabuf() calls it and then proceeds to access the
objects destroyed on close.  In particular, it grabs an extra reference to
another struct file that will be dropped as part of -&gt;release() for ours;
that "will be" is actually "might have already been".

Fix that by reserving descriptor before anything else and do fd_install()
only when everything had been set up.  As a side benefit, we no longer
have the failure exit with file already created, but reference to
underlying file (as well as -&gt;dmabuf_export_cnt, etc.) not grabbed yet;
unlike dma_buf_fd(), fd_install() can't fail.

Fixes: db1a8dd916aa ("habanalabs: add support for dma-buf exporter")
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>accel/ivpu: Fix reset_engine debugfs file logic</title>
<updated>2025-08-15T10:14:10+00:00</updated>
<author>
<name>Andrzej Kacprowski</name>
<email>Andrzej.Kacprowski@intel.com</email>
</author>
<published>2024-09-30T19:53:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be8a5602b05b28945fe7627aa85f13cf148e210d'/>
<id>urn:sha1:be8a5602b05b28945fe7627aa85f13cf148e210d</id>
<content type='text'>
commit 541a137254c71822e7a3ebdf8309c5a37b7de465 upstream.

The current reset_engine implementation unconditionally resets
all engines. Improve implementation to reset only the engine
requested by the user space to allow more granular testing.
Also use DEFINE_DEBUGFS_ATTRIBUTE() to simplify implementation.

Same changes applied to resume_engine debugfs file for consistency.

Signed-off-by: Andrzej Kacprowski &lt;Andrzej.Kacprowski@intel.com&gt;
Reviewed-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-22-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>accel/ivpu: Trigger device recovery on engine reset/resume failure</title>
<updated>2025-07-06T09:01:38+00:00</updated>
<author>
<name>Karol Wachowski</name>
<email>karol.wachowski@intel.com</email>
</author>
<published>2025-05-28T15:42:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6420a8d27ef3ffc9ee7b4c0bc7d6194f56ac0825'/>
<id>urn:sha1:6420a8d27ef3ffc9ee7b4c0bc7d6194f56ac0825</id>
<content type='text'>
[ Upstream commit a47e36dc5d90dc664cac87304c17d50f1595d634 ]

Trigger full device recovery when the driver fails to restore device state
via engine reset and resume operations. This is necessary because, even if
submissions from a faulty context are blocked, the NPU may still process
previously submitted faulty jobs if the engine reset fails to abort them.
Such jobs can continue to generate faults and occupy device resources.
When engine reset is ineffective, the only way to recover is to perform
a full device recovery.

Fixes: dad945c27a42 ("accel/ivpu: Add handling of VPU_JSM_STATUS_MVNCI_CONTEXT_VIOLATION_HW")
Cc: stable@vger.kernel.org # v6.15+
Signed-off-by: Karol Wachowski &lt;karol.wachowski@intel.com&gt;
Reviewed-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250528154253.500556-1-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>accel/ivpu: Add debugfs interface for setting HWS priority bands</title>
<updated>2025-07-06T09:01:38+00:00</updated>
<author>
<name>Karol Wachowski</name>
<email>karol.wachowski@intel.com</email>
</author>
<published>2025-02-04T08:46:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=397f3a7402faed3a3a212df1ccde8cea381bb8c2'/>
<id>urn:sha1:397f3a7402faed3a3a212df1ccde8cea381bb8c2</id>
<content type='text'>
[ Upstream commit 320323d2e5456df9d6236ac1ce9c030b1a74aa5b ]

Add debugfs interface to modify following priority bands properties:
 * grace period
 * process grace period
 * process quantum

This allows for the adjustment of hardware scheduling algorithm parameters
for each existing priority band, facilitating validation and fine-tuning.

Reviewed-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Signed-off-by: Karol Wachowski &lt;karol.wachowski@intel.com&gt;
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250204084622.2422544-4-jacek.lawrynowicz@linux.intel.com
Stable-dep-of: a47e36dc5d90 ("accel/ivpu: Trigger device recovery on engine reset/resume failure")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>accel/ivpu: Separate DB ID and CMDQ ID allocations from CMDQ allocation</title>
<updated>2025-07-06T09:01:38+00:00</updated>
<author>
<name>Karol Wachowski</name>
<email>karol.wachowski@intel.com</email>
</author>
<published>2025-01-07T17:32:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d80302350c32c56b927876fd9c8ed018b96cbb1c'/>
<id>urn:sha1:d80302350c32c56b927876fd9c8ed018b96cbb1c</id>
<content type='text'>
[ Upstream commit 950942b4813f8c44dbec683fdb140cf4a238516b ]

Move doorbell ID and command queue ID XArray allocations from command
queue memory allocation function. This will allow ID allocations to be
done without the need for actual memory allocation.

Signed-off-by: Karol Wachowski &lt;karol.wachowski@intel.com&gt;
Signed-off-by: Maciej Falkowski &lt;maciej.falkowski@linux.intel.com&gt;
Reviewed-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250107173238.381120-2-maciej.falkowski@linux.intel.com
Stable-dep-of: a47e36dc5d90 ("accel/ivpu: Trigger device recovery on engine reset/resume failure")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>accel/ivpu: Make command queue ID allocated on XArray</title>
<updated>2025-07-06T09:01:38+00:00</updated>
<author>
<name>Karol Wachowski</name>
<email>karol.wachowski@intel.com</email>
</author>
<published>2024-10-17T14:58:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fbc93866b0cf0aafa64fa29f9ff1c6a9b0db9357'/>
<id>urn:sha1:fbc93866b0cf0aafa64fa29f9ff1c6a9b0db9357</id>
<content type='text'>
[ Upstream commit 76ad741ec7349bb1112f3a0ff27adf1ca75cf025 ]

Use XArray for dynamic command queue ID allocations instead of fixed
ones. This is required by upcoming changes to UAPI that will allow to
manage command queues by user space instead of having predefined number
of queues in a context.

Signed-off-by: Karol Wachowski &lt;karol.wachowski@intel.com&gt;
Reviewed-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241017145817.121590-8-jacek.lawrynowicz@linux.intel.com
Stable-dep-of: a47e36dc5d90 ("accel/ivpu: Trigger device recovery on engine reset/resume failure")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>accel/ivpu: Remove copy engine support</title>
<updated>2025-07-06T09:01:37+00:00</updated>
<author>
<name>Andrzej Kacprowski</name>
<email>Andrzej.Kacprowski@intel.com</email>
</author>
<published>2024-10-17T14:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c3fa6e8441b1e1d18923fa121ea5f6f1793cf08'/>
<id>urn:sha1:0c3fa6e8441b1e1d18923fa121ea5f6f1793cf08</id>
<content type='text'>
[ Upstream commit 94b2a2c0e7cba3f163609dbd94120ee533ad2a07 ]

Copy engine was deprecated by the FW and is no longer supported.
Compute engine includes all copy engine functionality and should be used
instead.

This change does not affect user space as the copy engine was never
used outside of a couple of tests.

Signed-off-by: Andrzej Kacprowski &lt;Andrzej.Kacprowski@intel.com&gt;
Reviewed-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241017145817.121590-4-jacek.lawrynowicz@linux.intel.com
Stable-dep-of: a47e36dc5d90 ("accel/ivpu: Trigger device recovery on engine reset/resume failure")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>accel/ivpu: Do not fail on cmdq if failed to allocate preemption buffers</title>
<updated>2025-07-06T09:01:37+00:00</updated>
<author>
<name>Karol Wachowski</name>
<email>karol.wachowski@intel.com</email>
</author>
<published>2024-09-30T19:53:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=341de32ea4d6e728cee3430753ea78edbbb8ff44'/>
<id>urn:sha1:341de32ea4d6e728cee3430753ea78edbbb8ff44</id>
<content type='text'>
[ Upstream commit 08eb99ce911d3ea202f79b42b96cd6e8498f7f69 ]

Allow to proceed with job command queue creation even if preemption
buffers failed to be allocated, print warning that preemption on such
command queue will be disabled.

Signed-off-by: Karol Wachowski &lt;karol.wachowski@intel.com&gt;
Reviewed-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Reviewed-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-26-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@linux.intel.com&gt;
Stable-dep-of: a47e36dc5d90 ("accel/ivpu: Trigger device recovery on engine reset/resume failure")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
