<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/vringh.h, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-08-01T13:11:08+00:00</updated>
<entry>
<title>vhost: vringh: Remove unused functions</title>
<updated>2025-08-01T13:11:08+00:00</updated>
<author>
<name>Dr. David Alan Gilbert</name>
<email>linux@treblig.org</email>
</author>
<published>2025-06-17T00:18:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e9ef6937c726b97d4a6d49332d06e999acc15f5'/>
<id>urn:sha1:6e9ef6937c726b97d4a6d49332d06e999acc15f5</id>
<content type='text'>
The functions:
  vringh_abandon_kern()
  vringh_abandon_user()
  vringh_iov_pull_kern() and
  vringh_iov_push_kern()
were all added in 2013 by
commit f87d0fbb5798 ("vringh: host-side implementation of virtio rings.")
but have remained unused.

Remove them and the two helper functions they used.

Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Message-Id: &lt;20250617001838.114457-3-linux@treblig.org&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Tested-by: Lei Yang &lt;leiyang@redhat.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
</content>
</entry>
<entry>
<title>vhost: vringh: Remove unused iotlb functions</title>
<updated>2025-08-01T13:11:08+00:00</updated>
<author>
<name>Dr. David Alan Gilbert</name>
<email>linux@treblig.org</email>
</author>
<published>2025-06-17T00:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=569c392e191361cd05fba1fd87ed02ef0d130ef7'/>
<id>urn:sha1:569c392e191361cd05fba1fd87ed02ef0d130ef7</id>
<content type='text'>
The functions:
  vringh_abandon_iotlb()
  vringh_notify_disable_iotlb() and
  vringh_notify_enable_iotlb()

were added in 2020 by
commit 9ad9c49cfe97 ("vringh: IOTLB support")
but have remained unused.

Remove them.

Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Message-Id: &lt;20250617001838.114457-2-linux@treblig.org&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Tested-by: Lei Yang &lt;leiyang@redhat.com&gt;
</content>
</entry>
<entry>
<title>vringh: address kdoc warnings</title>
<updated>2023-04-21T07:02:34+00:00</updated>
<author>
<name>Simon Horman</name>
<email>horms@kernel.org</email>
</author>
<published>2023-03-31T08:56:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b2ffaa672edaf1a681537a9f47bc14ab6c9e8845'/>
<id>urn:sha1:b2ffaa672edaf1a681537a9f47bc14ab6c9e8845</id>
<content type='text'>
Address some minor kdoc warnings in vring.h.
* Place kdoc for 'struct vringh_config_ops' immediately before the structure
* Add missing documentation of members of 'vringh_iov' and 'vringh_kiov'

Warnings flagged by:
 $ ./scripts/kernel-doc -none include/linux/vringh.h
 include/linux/vringh.h:68: error: Cannot parse struct or union!
 include/linux/vringh.h:92: warning: Function parameter or member 'iov' not described in 'vringh_iov'
 include/linux/vringh.h:92: warning: Function parameter or member 'consumed' not described in 'vringh_iov'
 include/linux/vringh.h:92: warning: Function parameter or member 'i' not described in 'vringh_iov'
 include/linux/vringh.h:92: warning: Function parameter or member 'used' not described in 'vringh_iov'
 include/linux/vringh.h:92: warning: Function parameter or member 'max_num' not described in 'vringh_iov'
 include/linux/vringh.h:104: warning: Function parameter or member 'iov' not described in 'vringh_kiov'
 include/linux/vringh.h:104: warning: Function parameter or member 'consumed' not described in 'vringh_kiov'
 include/linux/vringh.h:104: warning: Function parameter or member 'i' not described in 'vringh_kiov'
 include/linux/vringh.h:104: warning: Function parameter or member 'used' not described in 'vringh_kiov'
 include/linux/vringh.h:104: warning: Function parameter or member 'max_num' not described in 'vringh_kiov'

Signed-off-by: Simon Horman &lt;horms@kernel.org&gt;
Message-Id: &lt;20230331-vhost-fixes-v1-2-1f046e735b9e@kernel.org&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vringh: support VA with iotlb</title>
<updated>2023-04-21T07:02:33+00:00</updated>
<author>
<name>Stefano Garzarella</name>
<email>sgarzare@redhat.com</email>
</author>
<published>2023-04-04T13:17:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=42823a871fd4e17b34034f43b36ae57bd2ed8a67'/>
<id>urn:sha1:42823a871fd4e17b34034f43b36ae57bd2ed8a67</id>
<content type='text'>
vDPA supports the possibility to use user VA in the iotlb messages.
So, let's add support for user VA in vringh to use it in the vDPA
simulators.

Acked-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Message-Id: &lt;20230404131716.45855-1-sgarzare@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vringh: fix a typo in comments for vringh_kiov</title>
<updated>2023-02-21T00:26:59+00:00</updated>
<author>
<name>Shunsuke Mie</name>
<email>mie@igel.co.jp</email>
</author>
<published>2023-02-02T10:42:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e44ca3f1f0ba2022f949003f02cc091144e54a3'/>
<id>urn:sha1:2e44ca3f1f0ba2022f949003f02cc091144e54a3</id>
<content type='text'>
Probably it is a simple copy error from struct vring_iov.

Signed-off-by: Shunsuke Mie &lt;mie@igel.co.jp&gt;
Message-Id: &lt;20230202104248.2040652-1-mie@igel.co.jp&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vringh: pull in spinlock header</title>
<updated>2021-08-11T10:44:24+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2021-08-10T16:25:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea2f6af16532511eb1cd8eb62845c37861f24ce8'/>
<id>urn:sha1:ea2f6af16532511eb1cd8eb62845c37861f24ce8</id>
<content type='text'>
we use a spinlock now pull in the correct header to
make vring.h self sufficient.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vringh: add vringh_kiov_length() helper</title>
<updated>2021-05-03T08:55:53+00:00</updated>
<author>
<name>Stefano Garzarella</name>
<email>sgarzare@redhat.com</email>
</author>
<published>2021-03-15T16:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14c9ac05ce09c8c6a89ffcca6ffb68707cba36c2'/>
<id>urn:sha1:14c9ac05ce09c8c6a89ffcca6ffb68707cba36c2</id>
<content type='text'>
This new helper returns the total number of bytes covered by
a vringh_kiov.

Suggested-by: Jason Wang &lt;jasowang@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Link: https://lore.kernel.org/r/20210315163450.254396-7-sgarzare@redhat.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vringh: implement vringh_kiov_advance()</title>
<updated>2021-05-03T08:55:53+00:00</updated>
<author>
<name>Stefano Garzarella</name>
<email>sgarzare@redhat.com</email>
</author>
<published>2021-03-15T16:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b8c06ad4d67db56ed6bdfb685c134da74e92a2c7'/>
<id>urn:sha1:b8c06ad4d67db56ed6bdfb685c134da74e92a2c7</id>
<content type='text'>
In some cases, it may be useful to provide a way to skip a number
of bytes in a vringh_kiov.

Let's implement vringh_kiov_advance() for this purpose, reusing the
code from vringh_iov_xfer().
We replace that code calling the new vringh_kiov_advance().

Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Link: https://lore.kernel.org/r/20210315163450.254396-6-sgarzare@redhat.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vringh: add 'iotlb_lock' to synchronize iotlb accesses</title>
<updated>2021-05-03T08:55:52+00:00</updated>
<author>
<name>Stefano Garzarella</name>
<email>sgarzare@redhat.com</email>
</author>
<published>2021-03-15T16:34:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f53d9910d009bc015b42d88114e2d86a93b0e6b7'/>
<id>urn:sha1:f53d9910d009bc015b42d88114e2d86a93b0e6b7</id>
<content type='text'>
Usually iotlb accesses are synchronized with a spinlock.
Let's request it as a new parameter in vringh_set_iotlb() and
hold it when we navigate the iotlb in iotlb_translate() to avoid
race conditions with any new additions/deletions of ranges from
the ioltb.

Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Link: https://lore.kernel.org/r/20210315163450.254396-3-sgarzare@redhat.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio: force spec specified alignment on types</title>
<updated>2020-06-02T06:45:13+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2020-04-06T12:42:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a865e420b9561235851c3f5d483c82ef389d29bd'/>
<id>urn:sha1:a865e420b9561235851c3f5d483c82ef389d29bd</id>
<content type='text'>
The ring element addresses are passed between components with different
alignments assumptions. Thus, if guest/userspace selects a pointer and
host then gets and dereferences it, we might need to decrease the
compiler-selected alignment to prevent compiler on the host from
assuming pointer is aligned.

This actually triggers on ARM with -mabi=apcs-gnu - which is a
deprecated configuration, but it seems safer to handle this
generally.

Note that userspace that allocates the memory is actually OK and does
not need to be fixed, but userspace that gets it from guest or another
process does need to be fixed. The later doesn't generally talk to the
kernel so while it might be buggy it's not talking to the kernel in the
buggy way - it's just using the header in the buggy way - so fixing
header and asking userspace to recompile is the best we can do.

I verified that the produced kernel binary on x86 is exactly identical
before and after the change.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
</feed>
