<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/vdpa/vdpa_user/vduse_dev.c, branch docs-fixes</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-fixes</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-fixes'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2026-02-22T01:09:51+00:00</updated>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>vduse: avoid adding implicit padding</title>
<updated>2026-02-09T17:21:32+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2026-02-02T22:48:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ebcff9dacaf2c1418f8bc927388186d7d3674603'/>
<id>urn:sha1:ebcff9dacaf2c1418f8bc927388186d7d3674603</id>
<content type='text'>
The vduse_iova_range_v2 and vduse_iotlb_entry_v2 structures are both
defined in a way that adds implicit padding and is incompatible between
i386 and x86_64 userspace because of the different structure alignment
requirements. Building the header with -Wpadded shows these new warnings:

vduse.h:305:1: error: padding struct size to alignment boundary with 4 bytes [-Werror=padded]
vduse.h:374:1: error: padding struct size to alignment boundary with 4 bytes [-Werror=padded]

Change the amount of padding in these two structures to align them to
64 bit words and avoid those problems. Since the v1 vduse_iotlb_entry
already has an inconsistent size, do not attempt to reuse the structure
but rather list the members indiviudally, with a fixed amount of
padding.

Fixes: 079212f6877e ("vduse: add vq group asid support")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20260202224835.559538-1-arnd@kernel.org&gt;
</content>
</entry>
<entry>
<title>vduse: bump version number</title>
<updated>2026-01-28T20:32:18+00:00</updated>
<author>
<name>Eugenio Pérez</name>
<email>eperezma@redhat.com</email>
</author>
<published>2026-01-19T14:33:05+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=12e0043d335f6c8badfe98f1d8f5e1910d430cf0'/>
<id>urn:sha1:12e0043d335f6c8badfe98f1d8f5e1910d430cf0</id>
<content type='text'>
Finalize the series by advertising VDUSE API v1 support to userspace.

Now that all required infrastructure for v1 (ASIDs, VQ groups,
update_iotlb_v2) is in place, VDUSE devices can opt in to the new
features.

Assume API version 0 if the VDUSE instance does not call
VDUSE_GET_API_VERSION to maintain compatibility.

Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20260119143306.1818855-13-eperezma@redhat.com&gt;
</content>
</entry>
<entry>
<title>vduse: add vq group asid support</title>
<updated>2026-01-28T20:32:18+00:00</updated>
<author>
<name>Eugenio Pérez</name>
<email>eperezma@redhat.com</email>
</author>
<published>2026-01-19T14:33:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=079212f6877e5d07308c8998a8fbc7539ca3f8f3'/>
<id>urn:sha1:079212f6877e5d07308c8998a8fbc7539ca3f8f3</id>
<content type='text'>
Add support for assigning Address Space Identifiers (ASIDs) to each VQ
group.  This enables mapping each group into a distinct memory space.

The vq group to ASID association is protected by a rwlock now.  But the
mutex domain_lock keeps protecting the domains of all ASIDs, as some
operations like the one related with the bounce buffer size still
requires to lock all the ASIDs.

Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20260119143306.1818855-12-eperezma@redhat.com&gt;
</content>
</entry>
<entry>
<title>vduse: merge tree search logic of IOTLB_GET_FD and IOTLB_GET_INFO ioctls</title>
<updated>2026-01-28T20:32:17+00:00</updated>
<author>
<name>Eugenio Pérez</name>
<email>eperezma@redhat.com</email>
</author>
<published>2026-01-19T14:33:03+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f3dc3a8a3ea71d4758b0f63affceb18398cf79b8'/>
<id>urn:sha1:f3dc3a8a3ea71d4758b0f63affceb18398cf79b8</id>
<content type='text'>
The next patch adds new ioctl with the ASID member per entry.  Abstract
these two so it can be build on top easily.

Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20260119143306.1818855-11-eperezma@redhat.com&gt;
</content>
</entry>
<entry>
<title>vduse: take out allocations from vduse_dev_alloc_coherent</title>
<updated>2026-01-28T20:32:17+00:00</updated>
<author>
<name>Eugenio Pérez</name>
<email>eperezma@redhat.com</email>
</author>
<published>2026-01-19T14:33:02+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=489d76520612abf9a4ede4344349105406c91a73'/>
<id>urn:sha1:489d76520612abf9a4ede4344349105406c91a73</id>
<content type='text'>
The function vduse_dev_alloc_coherent will be called under rwlock in
next patches.  Make it out of the lock to avoid increasing its fail
rate.

Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20260119143306.1818855-10-eperezma@redhat.com&gt;
</content>
</entry>
<entry>
<title>vduse: remove unused vaddr parameter of vduse_domain_free_coherent</title>
<updated>2026-01-28T20:32:17+00:00</updated>
<author>
<name>Eugenio Pérez</name>
<email>eperezma@redhat.com</email>
</author>
<published>2026-01-19T14:33:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=766e1749c0ef6a09651be9b8a8283d508c322b58'/>
<id>urn:sha1:766e1749c0ef6a09651be9b8a8283d508c322b58</id>
<content type='text'>
We will modify the function in next patches so let's clean it first.

Signed-off-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20260119143306.1818855-9-eperezma@redhat.com&gt;
</content>
</entry>
<entry>
<title>vduse: refactor vdpa_dev_add for goto err handling</title>
<updated>2026-01-28T20:32:17+00:00</updated>
<author>
<name>Eugenio Pérez</name>
<email>eperezma@redhat.com</email>
</author>
<published>2026-01-19T14:33:00+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3e2ddda6f4cb9e25e2e0a24033e13e347d6ce952'/>
<id>urn:sha1:3e2ddda6f4cb9e25e2e0a24033e13e347d6ce952</id>
<content type='text'>
Next patches introduce more error paths in this function.  Refactor it
so they can be accommodated through gotos.

Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Reviewed-by: Xie Yongji &lt;xieyongji@bytedance.com&gt;
Signed-off-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20260119143306.1818855-8-eperezma@redhat.com&gt;
</content>
</entry>
<entry>
<title>vduse: return internal vq group struct as map token</title>
<updated>2026-01-28T20:32:16+00:00</updated>
<author>
<name>Eugenio Pérez</name>
<email>eperezma@redhat.com</email>
</author>
<published>2026-01-19T14:32:57+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=02e3f7ffe2906033da73b7c7ea8180b131d0cdbc'/>
<id>urn:sha1:02e3f7ffe2906033da73b7c7ea8180b131d0cdbc</id>
<content type='text'>
Return the internal struct that represents the vq group as virtqueue map
token, instead of the device.  This allows the map functions to access
the information per group.

At this moment all the virtqueues share the same vq group, that only
can point to ASID 0.  This change prepares the infrastructure for actual
per-group address space handling

Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20260119143306.1818855-5-eperezma@redhat.com&gt;
</content>
</entry>
</feed>
