<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/vhost/vdpa.c, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-12-08T19:53:15Z</updated>
<entry>
<title>vdpa: check that offsets are within bounds</title>
<updated>2021-12-08T19:53:15Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2021-12-08T10:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ed21c1451a14d139e1ceb18f2fa70865ce3195a'/>
<id>urn:sha1:3ed21c1451a14d139e1ceb18f2fa70865ce3195a</id>
<content type='text'>
In this function "c-&gt;off" is a u32 and "size" is a long.  On 64bit systems
if "c-&gt;off" is greater than "size" then "size - c-&gt;off" is a negative and
we always return -E2BIG.  But on 32bit systems the subtraction is type
promoted to a high positive u32 value and basically any "c-&gt;len" is
accepted.

Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
Reported-by: Xie Yongji &lt;xieyongji@bytedance.com&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/20211208103337.GA4047@kili
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>vhost-vdpa: clean irqs before reseting vdpa device</title>
<updated>2021-11-25T00:00:28Z</updated>
<author>
<name>Wu Zongyong</name>
</author>
<published>2021-11-15T03:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea8f17e44fa7d54fae287ccbe30ce269afb5ee42'/>
<id>urn:sha1:ea8f17e44fa7d54fae287ccbe30ce269afb5ee42</id>
<content type='text'>
Vdpa devices should be reset after unseting irqs of virtqueues, or we
will get errors when killing qemu process:

&gt;&gt; pi_update_irte: failed to update PI IRTE
&gt;&gt; irq bypass consumer (token 0000000065102a43) unregistration fails: -22

Signed-off-by: Wu Zongyong &lt;wuzongyong@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/a2cb60cf73be9da5c4e6399242117d8818f975ae.1636946171.git.wuzongyong@linux.alibaba.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: Introduce and use vdpa device get, set config helpers</title>
<updated>2021-11-01T09:26:49Z</updated>
<author>
<name>Parav Pandit</name>
</author>
<published>2021-10-26T17:55:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6dbb1f1687a2ccdfc5b84b0a35bbc6dfefc4de3b'/>
<id>urn:sha1:6dbb1f1687a2ccdfc5b84b0a35bbc6dfefc4de3b</id>
<content type='text'>
Subsequent patches enable get and set configuration either
via management device or via vdpa device' config ops.

This requires synchronization between multiple callers to get and set
config callbacks. Features setting also influence the layout of the
configuration fields endianness.

To avoid exposing synchronization primitives to callers, introduce
helper for setting the configuration and use it.

Signed-off-by: Parav Pandit &lt;parav@nvidia.com&gt;
Reviewed-by: Eli Cohen &lt;elic@nvidia.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Link: https://lore.kernel.org/r/20211026175519.87795-2-parav@nvidia.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost-vdpa: Fix the wrong input in config_cb</title>
<updated>2021-10-13T12:42:07Z</updated>
<author>
<name>Cindy Lu</name>
</author>
<published>2021-09-29T09:09:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bcef9356fc2e1302daf373c83c826aa27954d128'/>
<id>urn:sha1:bcef9356fc2e1302daf373c83c826aa27954d128</id>
<content type='text'>
Fix the wrong input in for config_cb. In function vhost_vdpa_config_cb,
the input cb.private was used as struct vhost_vdpa, so the input was
wrong here, fix this issue

Fixes: 776f395004d8 ("vhost_vdpa: Support config interrupt in vdpa")
Signed-off-by: Cindy Lu &lt;lulu@redhat.com&gt;
Link: https://lore.kernel.org/r/20210929090933.20465-1-lulu@redhat.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost_vdpa: unset vq irq before freeing irq</title>
<updated>2021-10-13T12:35:36Z</updated>
<author>
<name>Wu Zongyong</name>
</author>
<published>2021-09-15T06:39:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97f854be203883b61d24f230445bd533bbdf770c'/>
<id>urn:sha1:97f854be203883b61d24f230445bd533bbdf770c</id>
<content type='text'>
Currently we unset vq irq after freeing irq and that will result in
error messages:

  pi_update_irte: failed to update PI IRTE
  irq bypass consumer (token 000000005a07a12b) unregistration fails: -22

This patch solves this.

Signed-off-by: Wu Zongyong &lt;wuzongyong@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/02637d38dcf4e4b836c5b3a65055fe92bf812b3b.1631687872.git.wuzongyong@linux.alibaba.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: potential uninitialized return in vhost_vdpa_va_map()</title>
<updated>2021-09-14T22:10:43Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2021-09-07T07:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be9c6bad9b46451ba5bb8d366c51e2475f374981'/>
<id>urn:sha1:be9c6bad9b46451ba5bb8d366c51e2475f374981</id>
<content type='text'>
The concern here is that "ret" can be uninitialized if we hit the
"goto next" condition on every iteration through the loop.

Fixes: 41ba1b5f9d4b ("vdpa: Support transferring virtual addressing during DMA mapping")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/20210907073253.GB18254@kili
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Xie Yongji &lt;xieyongji@bytedance.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: Support transferring virtual addressing during DMA mapping</title>
<updated>2021-09-06T11:20:57Z</updated>
<author>
<name>Xie Yongji</name>
</author>
<published>2021-08-31T10:36:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8945ec411209272bcd4ae9e75ea1b078257e492'/>
<id>urn:sha1:d8945ec411209272bcd4ae9e75ea1b078257e492</id>
<content type='text'>
This patch introduces an attribute for vDPA device to indicate
whether virtual address can be used. If vDPA device driver set
it, vhost-vdpa bus driver will not pin user page and transfer
userspace virtual address instead of physical address during
DMA mapping. And corresponding vma-&gt;vm_file and offset will be
also passed as an opaque pointer.

Suggested-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Xie Yongji &lt;xieyongji@bytedance.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Link: https://lore.kernel.org/r/20210831103634.33-11-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()</title>
<updated>2021-09-06T11:20:57Z</updated>
<author>
<name>Xie Yongji</name>
</author>
<published>2021-08-31T10:36:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22af48cf91aae5f2fd32fe811d9be1c52d7a801b'/>
<id>urn:sha1:22af48cf91aae5f2fd32fe811d9be1c52d7a801b</id>
<content type='text'>
The upcoming patch is going to support VA mapping/unmapping.
So let's factor out the logic of PA mapping/unmapping firstly
to make the code more readable.

Suggested-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Xie Yongji &lt;xieyongji@bytedance.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Link: https://lore.kernel.org/r/20210831103634.33-10-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: Add an opaque pointer for vdpa_config_ops.dma_map()</title>
<updated>2021-09-06T11:20:57Z</updated>
<author>
<name>Xie Yongji</name>
</author>
<published>2021-08-31T10:36:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c10fb9454adc80c062151c6a436047e1fa59e99f'/>
<id>urn:sha1:c10fb9454adc80c062151c6a436047e1fa59e99f</id>
<content type='text'>
Add an opaque pointer for DMA mapping.

Suggested-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Xie Yongji &lt;xieyongji@bytedance.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Link: https://lore.kernel.org/r/20210831103634.33-9-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost-vdpa: Handle the failure of vdpa_reset()</title>
<updated>2021-09-06T11:20:57Z</updated>
<author>
<name>Xie Yongji</name>
</author>
<published>2021-08-31T10:36:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f05630dc65d62df5d55ad3e1038ffbe5e2ce9c3'/>
<id>urn:sha1:7f05630dc65d62df5d55ad3e1038ffbe5e2ce9c3</id>
<content type='text'>
The vdpa_reset() may fail now. This adds check to its return
value and fail the vhost_vdpa_open().

Signed-off-by: Xie Yongji &lt;xieyongji@bytedance.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Link: https://lore.kernel.org/r/20210831103634.33-7-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
</feed>
