All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Eugenio Pérez" <eperezma@redhat.com>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, leiyang@redhat.com
Subject: Re: [PATCH] mlx5_vdpa: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK
Date: Mon, 3 Jul 2023 11:46:18 -0400	[thread overview]
Message-ID: <20230703110241-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230703142514.363256-1-eperezma@redhat.com>

On Mon, Jul 03, 2023 at 04:25:14PM +0200, Eugenio Pérez wrote:
> Offer this backend feature as mlx5 is compatible with it. It allows it
> to do live migration with CVQ, dynamically switching between passthrough
> and shadow virtqueue.
> 
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>

Same comment.

> ---
>  drivers/vdpa/mlx5/net/mlx5_vnet.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 9138ef2fb2c8..5f309a16b9dc 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -7,6 +7,7 @@
>  #include <uapi/linux/virtio_net.h>
>  #include <uapi/linux/virtio_ids.h>
>  #include <uapi/linux/vdpa.h>
> +#include <uapi/linux/vhost_types.h>
>  #include <linux/virtio_config.h>
>  #include <linux/auxiliary_bus.h>
>  #include <linux/mlx5/cq.h>
> @@ -2499,6 +2500,11 @@ static void unregister_link_notifier(struct mlx5_vdpa_net *ndev)
>  		flush_workqueue(ndev->mvdev.wq);
>  }
>  
> +static u64 mlx5_vdpa_get_backend_features(const struct vdpa_device *vdpa)
> +{
> +	return BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK);
> +}
> +
>  static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features)
>  {
>  	struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev);
> @@ -3140,6 +3146,7 @@ static const struct vdpa_config_ops mlx5_vdpa_ops = {
>  	.get_vq_align = mlx5_vdpa_get_vq_align,
>  	.get_vq_group = mlx5_vdpa_get_vq_group,
>  	.get_device_features = mlx5_vdpa_get_device_features,
> +	.get_backend_features = mlx5_vdpa_get_backend_features,
>  	.set_driver_features = mlx5_vdpa_set_driver_features,
>  	.get_driver_features = mlx5_vdpa_get_driver_features,
>  	.set_config_cb = mlx5_vdpa_set_config_cb,
> -- 
> 2.39.3

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Eugenio Pérez" <eperezma@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Dragos Tatulea <dtatulea@nvidia.com>,
	virtualization@lists.linux-foundation.org, leiyang@redhat.com,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Si-Wei Liu <si-wei.liu@oracle.com>,
	Jason Wang <jasowang@redhat.com>
Subject: Re: [PATCH] mlx5_vdpa: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK
Date: Mon, 3 Jul 2023 11:46:18 -0400	[thread overview]
Message-ID: <20230703110241-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230703142514.363256-1-eperezma@redhat.com>

On Mon, Jul 03, 2023 at 04:25:14PM +0200, Eugenio Pérez wrote:
> Offer this backend feature as mlx5 is compatible with it. It allows it
> to do live migration with CVQ, dynamically switching between passthrough
> and shadow virtqueue.
> 
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>

Same comment.

> ---
>  drivers/vdpa/mlx5/net/mlx5_vnet.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 9138ef2fb2c8..5f309a16b9dc 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -7,6 +7,7 @@
>  #include <uapi/linux/virtio_net.h>
>  #include <uapi/linux/virtio_ids.h>
>  #include <uapi/linux/vdpa.h>
> +#include <uapi/linux/vhost_types.h>
>  #include <linux/virtio_config.h>
>  #include <linux/auxiliary_bus.h>
>  #include <linux/mlx5/cq.h>
> @@ -2499,6 +2500,11 @@ static void unregister_link_notifier(struct mlx5_vdpa_net *ndev)
>  		flush_workqueue(ndev->mvdev.wq);
>  }
>  
> +static u64 mlx5_vdpa_get_backend_features(const struct vdpa_device *vdpa)
> +{
> +	return BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK);
> +}
> +
>  static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features)
>  {
>  	struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev);
> @@ -3140,6 +3146,7 @@ static const struct vdpa_config_ops mlx5_vdpa_ops = {
>  	.get_vq_align = mlx5_vdpa_get_vq_align,
>  	.get_vq_group = mlx5_vdpa_get_vq_group,
>  	.get_device_features = mlx5_vdpa_get_device_features,
> +	.get_backend_features = mlx5_vdpa_get_backend_features,
>  	.set_driver_features = mlx5_vdpa_set_driver_features,
>  	.get_driver_features = mlx5_vdpa_get_driver_features,
>  	.set_config_cb = mlx5_vdpa_set_config_cb,
> -- 
> 2.39.3


  reply	other threads:[~2023-07-03 15:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03 14:25 [PATCH] mlx5_vdpa: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK Eugenio Pérez
2023-07-03 15:46 ` Michael S. Tsirkin [this message]
2023-07-03 15:46   ` Michael S. Tsirkin
2023-07-04  0:26   ` Si-Wei Liu
2023-07-04  0:26     ` Si-Wei Liu
2023-07-04 10:16     ` Michael S. Tsirkin
2023-07-04 10:16       ` Michael S. Tsirkin
2023-07-05  5:11       ` Jason Wang
2023-07-05  5:11         ` Jason Wang
2023-07-05  5:31         ` Michael S. Tsirkin
2023-07-05  5:31           ` Michael S. Tsirkin
2023-07-05  5:47           ` Jason Wang
2023-07-05  5:47             ` Jason Wang
2023-07-05  6:15             ` Michael S. Tsirkin
2023-07-05  6:15               ` Michael S. Tsirkin
2023-07-05  7:32               ` Jason Wang
2023-07-05  7:32                 ` Jason Wang
2023-10-04 12:56       ` Eugenio Perez Martin
2023-10-04 16:27         ` Michael S. Tsirkin
2023-10-04 16:27           ` Michael S. Tsirkin
2023-10-04 17:22           ` Eugenio Perez Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230703110241-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=eperezma@redhat.com \
    --cc=leiyang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.