<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/vhost/vdpa.c, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-03-28T20:53:00Z</updated>
<entry>
<title>vdpa: support exposing the count of vqs to userspace</title>
<updated>2022-03-28T20:53:00Z</updated>
<author>
<name>Longpeng</name>
</author>
<published>2022-03-15T03:25:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b04d910af330b55e1d5d6eb9ecd53a375a9cf81c'/>
<id>urn:sha1:b04d910af330b55e1d5d6eb9ecd53a375a9cf81c</id>
<content type='text'>
- GET_VQS_COUNT: the count of virtqueues that exposed

Signed-off-by: Longpeng &lt;longpeng2@huawei.com&gt;
Link: https://lore.kernel.org/r/20220315032553.455-4-longpeng2@huawei.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Longpeng &amp;lt;&lt;a href="mailto:longpeng2@huawei.com" target="_blank"&gt;longpeng2@huawei.com&lt;/a&gt;&amp;gt;&lt;br&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: change the type of nvqs to u32</title>
<updated>2022-03-28T20:53:00Z</updated>
<author>
<name>Longpeng</name>
</author>
<published>2022-03-15T03:25:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81d46d693173a5c86a9b0c648eca1817ad5c0ae5'/>
<id>urn:sha1:81d46d693173a5c86a9b0c648eca1817ad5c0ae5</id>
<content type='text'>
Change vdpa_device.nvqs and vhost_vdpa.nvqs to use u32

Signed-off-by: Longpeng &lt;longpeng2@huawei.com&gt;
Link: https://lore.kernel.org/r/20220315032553.455-3-longpeng2@huawei.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Longpeng &amp;lt;&lt;a href="mailto:longpeng2@huawei.com" target="_blank"&gt;longpeng2@huawei.com&lt;/a&gt;&amp;gt;&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Acked-by: Jason Wang &amp;lt;&lt;a href="mailto:jasowang@redhat.com"&gt;jasowang@redhat.com&lt;/a&gt;&amp;gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: support exposing the config size to userspace</title>
<updated>2022-03-28T20:53:00Z</updated>
<author>
<name>Longpeng</name>
</author>
<published>2022-03-15T03:25:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a61280ddddaa45f95b60dd54c05f8e0e5b6810b7'/>
<id>urn:sha1:a61280ddddaa45f95b60dd54c05f8e0e5b6810b7</id>
<content type='text'>
- GET_CONFIG_SIZE: return the size of the virtio config space.

The size contains the fields which are conditional on feature
bits.

Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Longpeng &lt;longpeng2@huawei.com&gt;
Link: https://lore.kernel.org/r/20220315032553.455-2-longpeng2@huawei.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost_vdpa: don't setup irq offloading when irq_num &lt; 0</title>
<updated>2022-03-28T20:52:57Z</updated>
<author>
<name>Zhu Lingshan</name>
</author>
<published>2022-02-22T11:54:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cce0ab2b2a39072d81f98017f7b076f3410ef740'/>
<id>urn:sha1:cce0ab2b2a39072d81f98017f7b076f3410ef740</id>
<content type='text'>
When irq number is negative(e.g., -EINVAL), the virtqueue
may be disabled or the virtqueues are sharing a device irq.
In such case, we should not setup irq offloading for a virtqueue.

Signed-off-by: Zhu Lingshan &lt;lingshan.zhu@intel.com&gt;
Link: https://lore.kernel.org/r/20220222115428.998334-3-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: factor out vdpa_set_features_unlocked for vdpa internal use</title>
<updated>2022-03-04T16:56:33Z</updated>
<author>
<name>Si-Wei Liu</name>
</author>
<published>2022-01-15T00:27:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0077cc13b831f8fad5557442f73bf7728683713'/>
<id>urn:sha1:e0077cc13b831f8fad5557442f73bf7728683713</id>
<content type='text'>
No functional change introduced. vdpa bus driver such as virtio_vdpa
or vhost_vdpa is not supposed to take care of the locking for core
by its own. The locked API vdpa_set_features should suffice the
bus driver's need.

Signed-off-by: Si-Wei Liu &lt;si-wei.liu@oracle.com&gt;
Reviewed-by: Eli Cohen &lt;elic@nvidia.com&gt;
Link: https://lore.kernel.org/r/1642206481-30721-2-git-send-email-si-wei.liu@oracle.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: Protect vdpa reset with cf_mutex</title>
<updated>2022-01-14T23:50:54Z</updated>
<author>
<name>Eli Cohen</name>
</author>
<published>2022-01-11T18:33:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=680ab9d69a04cfd9f3f5fedaacbc1974b2959121'/>
<id>urn:sha1:680ab9d69a04cfd9f3f5fedaacbc1974b2959121</id>
<content type='text'>
Call reset using the wrapper function vdpa_reset() to make sure the
operation is serialized with cf_mutex.

This comes to protect from the following possible scenario:

vhost_vdpa_set_status() could call the reset op. Since the call is not
protected by cf_mutex, a netlink thread calling vdpa_dev_config_fill
could get passed the VIRTIO_CONFIG_S_FEATURES_OK check in
vdpa_dev_config_fill() and end up reporting wrong features.

Fixes: 5f6e85953d8f ("vdpa: Read device configuration only if FEATURES_OK")
Signed-off-by: Eli Cohen &lt;elic@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220111183400.38418-3-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Si-Wei Liu&lt;si-wei.liu@oracle.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: Avoid taking cf_mutex lock on get status</title>
<updated>2022-01-14T23:50:54Z</updated>
<author>
<name>Eli Cohen</name>
</author>
<published>2022-01-11T18:33:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6d955d80830b6e6f6a170be68cc3628f36365dd'/>
<id>urn:sha1:f6d955d80830b6e6f6a170be68cc3628f36365dd</id>
<content type='text'>
Avoid the wrapper holding cf_mutex since it is not protecting anything.
To avoid confusion and unnecessary overhead incurred by it, remove.

Fixes: f489f27bc0ab ("vdpa: Sync calls set/get config/status with cf_mutex")
Signed-off-by: Eli Cohen &lt;elic@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220111183400.38418-2-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Si-Wei Liu&lt;si-wei.liu@oracle.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: Allow to configure max data virtqueues</title>
<updated>2022-01-14T23:50:53Z</updated>
<author>
<name>Eli Cohen</name>
</author>
<published>2022-01-05T11:46:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aba21aff772b8622e08f07219069be793429a48f'/>
<id>urn:sha1:aba21aff772b8622e08f07219069be793429a48f</id>
<content type='text'>
Add netlink support to configure the max virtqueue pairs for a device.
At least one pair is required. The maximum is dictated by the device.

Example:
$ vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 max_vqp 4

Signed-off-by: Eli Cohen &lt;elic@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220105114646.577224-6-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: Sync calls set/get config/status with cf_mutex</title>
<updated>2022-01-14T23:50:53Z</updated>
<author>
<name>Eli Cohen</name>
</author>
<published>2022-01-05T11:46:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73bc0dbb591baea322a7319c735e5f6c7dba9cfb'/>
<id>urn:sha1:73bc0dbb591baea322a7319c735e5f6c7dba9cfb</id>
<content type='text'>
Add wrappers to get/set status and protect these operations with
cf_mutex to serialize these operations with respect to get/set config
operations.

Signed-off-by: Eli Cohen &lt;elic@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220105114646.577224-4-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vdpa: Provide interface to read driver features</title>
<updated>2022-01-14T23:50:53Z</updated>
<author>
<name>Eli Cohen</name>
</author>
<published>2022-01-05T11:46:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a64917bc2e9b1e0aa716b783c4ec879fdd280300'/>
<id>urn:sha1:a64917bc2e9b1e0aa716b783c4ec879fdd280300</id>
<content type='text'>
Provide an interface to read the negotiated features. This is needed
when building the netlink message in vdpa_dev_net_config_fill().

Also fix the implementation of vdpa_dev_net_config_fill() to use the
negotiated features instead of the device features.

To make APIs clearer, make the following name changes to struct
vdpa_config_ops so they better describe their operations:

get_features -&gt; get_device_features
set_features -&gt; set_driver_features

Finally, add get_driver_features to return the negotiated features and
add implementation to all the upstream drivers.

Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Eli Cohen &lt;elic@nvidia.com&gt;
Link: https://lore.kernel.org/r/20220105114646.577224-2-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
</feed>
